diff --git a/ESP/ini/pinouts.ini b/ESP/ini/pinouts.ini index 88267a1..82b58b5 100644 --- a/ESP/ini/pinouts.ini +++ b/ESP/ini/pinouts.ini @@ -263,9 +263,9 @@ build_flags = pwdn_gpio_num = -1 reset_gpio_num = -1 xclk_gpio_num = 4 -siod_gpio_num = 14 -sioc_gpio_num = 13 -y9_gpio_num = 39 +siod_gpio_num = 48 +sioc_gpio_num = 47 +y9_gpio_num = 13 y8_gpio_num = 5 y7_gpio_num = 6 y6_gpio_num = 15 @@ -273,11 +273,12 @@ y5_gpio_num = 17 y4_gpio_num = 8 y3_gpio_num = 18 y2_gpio_num = 16 -vsync_gpio_num = 9 -href_gpio_num = 10 +vsync_gpio_num = 21 +href_gpio_num = 14 pclk_gpio_num = 7 build_flags = '-DCAMERA_MODULE_NAME="SWROOM_BABBLE_S3"' + -DCONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3=1 -DPWDN_GPIO_NUM=${pinoutSWROOMBABBLES3.PWDN_GPIO_NUM} -DRESET_GPIO_NUM=${pinoutSWROOMBABBLES3.RESET_GPIO_NUM} -DXCLK_GPIO_NUM=${pinoutSWROOMBABBLES3.XCLK_GPIO_NUM} diff --git a/ESP/src/main.cpp b/ESP/src/main.cpp index 881539b..db05ca3 100644 --- a/ESP/src/main.cpp +++ b/ESP/src/main.cpp @@ -11,6 +11,10 @@ SerialManager serialManager(&commandManager); #ifdef CONFIG_CAMERA_MODULE_ESP32S3_XIAO_SENSE LEDManager ledManager(LED_BUILTIN); + +#elif CONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3 +LEDManager ledManager(38); + #else LEDManager ledManager(33); #endif // ESP32S3_XIAO_SENSE @@ -82,6 +86,17 @@ void setup() { Logo::printASCII(); ledManager.begin(); + #ifdef CONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3 // Set IR emitter strength to 100%. + const int ledPin = 1; // Replace this with a command endpoint eventually. + const int freq = 5000; + const int ledChannel = 0; + const int resolution = 8; + const int dutyCycle = 255; + ledcSetup(ledChannel, freq, resolution); + ledcAttachPin(1, ledChannel); + ledcWrite(ledChannel, dutyCycle); + #endif + #ifndef SIM_ENABLED deviceConfig.attach(cameraHandler); #endif // SIM_ENABLED