Skip to content

Commit

Permalink
feat: Update Babble Board Pinout and Enable Emitters (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
RamesTheGeneric authored Jul 14, 2024
1 parent 40224d8 commit a8c1603
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ESP/ini/pinouts.ini
Original file line number Diff line number Diff line change
Expand Up @@ -263,21 +263,22 @@ 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
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}
Expand Down
15 changes: 15 additions & 0 deletions ESP/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a8c1603

Please sign in to comment.