Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Commit 056e19f

Browse files
Finalize Babble Board Configs (#80)
* Update Babble Board Pinout and Enable Emitters * Update Babble Board Conf * Lower AEC value for Babble boards * Remove Comments * Add Firmware cropping to for the Babble Board
1 parent 210dad8 commit 056e19f

2 files changed

Lines changed: 70 additions & 3 deletions

File tree

ESP/ini/boards.ini

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ upload_flags = --no-stub
190190

191191
[env:Babble-wrooms-s3]
192192
board = esp32-s3-devkitc-1
193-
board_build.flash_mode = qio ; qio_qspi
193+
board_upload.flashsize = "4MB"
194+
board_upload.flash_size=4MB
195+
board_upload.maximum_size = 4194304
196+
board_build.flash_mode = qio
194197
board_build.arduino.memory_type = qio_qspi
195198
build_type = debug
196199
build_flags = ${env.build_flags}
@@ -200,9 +203,27 @@ build_flags = ${env.build_flags}
200203
${pinoutSWROOMBABBLES3.build_flags}
201204
upload_flags = --no-stub
202205

206+
[env:Babble-wrooms-s3_release]
207+
board = esp32-s3-devkitc-1
208+
board_upload.flashsize = "4MB"
209+
board_upload.flash_size=4MB
210+
board_upload.maximum_size = 4194304
211+
board_build.flash_mode = qio
212+
board_build.arduino.memory_type = qio_qspi
213+
build_type = debug
214+
build_flags = ${env.build_flags}
215+
-DCORE_DEBUG_LEVEL=1
216+
-DDEBUG_MODE=0
217+
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
218+
${pinoutSWROOMBABBLES3.build_flags}
219+
upload_flags = --no-stub
220+
203221
[env:Babble_USB-wrooms-s3]
204222
board = esp32-s3-devkitc-1
205-
board_build.flash_mode = qio ; qio_qspi
223+
board_upload.flashsize = "4MB"
224+
board_upload.flash_size=4MB
225+
board_upload.maximum_size = 4194304
226+
board_build.flash_mode = qio
206227
board_build.arduino.memory_type = qio_qspi
207228
build_type = debug
208229
build_flags = ${env.build_flags}
@@ -211,6 +232,25 @@ build_flags = ${env.build_flags}
211232
-DETVR_EYE_TRACKER_USB_API
212233
-DARDUINO_USB_MODE=1
213234
-DARDUINO_USB_CDC_ON_BOOT=1
235+
-DARDUINO_FLASH
236+
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
237+
${pinoutSWROOMBABBLES3.build_flags}
238+
upload_flags = --no-stub
239+
240+
[env:Babble_USB-wrooms-s3_release]
241+
board = esp32-s3-devkitc-1
242+
board_upload.flashsize = "4MB"
243+
board_upload.flash_size=4MB
244+
board_upload.maximum_size = 4194304
245+
board_build.flash_mode = qio
246+
board_build.arduino.memory_type = qio_qspi
247+
build_type = debug
248+
build_flags = ${env.build_flags}
249+
-DCORE_DEBUG_LEVEL=1
250+
-DDEBUG_MODE=0
251+
-DETVR_EYE_TRACKER_USB_API
252+
-DARDUINO_USB_MODE=1
253+
-DARDUINO_USB_CDC_ON_BOOT=1
214254
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
215255
${pinoutSWROOMBABBLES3.build_flags}
216256
upload_flags = --no-stub

ESP/lib/src/io/camera/cameraHandler.cpp

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ void CameraHandler::setupCameraSensor() {
108108
camera_sensor->set_aec2(camera_sensor, 0); // 0 = disable , 1 = enable
109109
camera_sensor->set_ae_level(camera_sensor, 0); // -2 to 2
110110
camera_sensor->set_aec_value(camera_sensor, 300); // 0 to 1200
111+
// Use a lower aec value for babble to better isolate the face with illuminators
112+
#ifdef CONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3
113+
camera_sensor->set_aec_value(camera_sensor, 100); // 0 to 1200
114+
#endif
111115

112116
// controls the gain
113117
camera_sensor->set_gain_ctrl(camera_sensor, 0); // 0 = disable , 1 = enable
@@ -195,7 +199,29 @@ void CameraHandler::loadConfigData() {
195199
log_d("Loading camera config data done");
196200
}
197201

198-
int CameraHandler::setCameraResolution(framesize_t frameSize) {
202+
#ifdef CONFIG_CAMERA_MODULE_SWROOM_BABBLE_S3
203+
int CameraHandler::setCameraResolution(framesize_t frameSize) { // For Babble, use a firmware crop as shown by Physdude
204+
if (camera_sensor->pixformat == PIXFORMAT_JPEG) {
205+
try {
206+
int outputSize = 240;
207+
208+
int baseRes = 2; //CIF
209+
int ROIsize = 240;
210+
int startPointX = 80;
211+
int startPointY = 28;
212+
213+
return camera_sensor->set_res_raw(camera_sensor, baseRes, 0, 0, 0, startPointX, startPointY, ROIsize, ROIsize, outputSize, outputSize, 0, 0);
214+
215+
} catch (...) {
216+
// they sent us a malformed or unsupported frameSize - rather than crash -
217+
// tell them about it
218+
return -1;
219+
}
220+
}
221+
return -1;
222+
}
223+
#else
224+
int CameraHandler::setCameraResolution(framesize_t frameSize) { // By default, use the standard method.
199225
if (camera_sensor->pixformat == PIXFORMAT_JPEG) {
200226
try {
201227
return camera_sensor->set_framesize(camera_sensor, frameSize);
@@ -207,6 +233,7 @@ int CameraHandler::setCameraResolution(framesize_t frameSize) {
207233
}
208234
return -1;
209235
}
236+
#endif
210237

211238
int CameraHandler::setVFlip(int direction) {
212239
return camera_sensor->set_vflip(camera_sensor, direction);

0 commit comments

Comments
 (0)