General ArduinoGravity

esp32 S3 AI cam module

userHead Gary.Trauth 2026-07-21 08:30:15 520 Views8 Replies

I am very new to this so please be gentle on my ignorance. I am try to build a simple pan tracking head using the dfrobot esp32 s3 Ai cam module and  dfrobot esp32 C3 romeo mini.

I would like to have the head follow children in costume. I have tried several frame comparison sketches to no avail. suggestions? 

2026-07-22 21:36:19

Hinar.Joestar , Thanks

After i sent that mess i was thinking the same thing about it being in 2 locations. I am working on that as I send this. Hopefully I'll get to it sometime today after my other work.

 

userHeadPic Gary.Trauth
Gary.Trauth wrote:

OK, thank you 

that seemed to be the issue. After deleting the duplicate folder and everything. I complied the sketch, not sure if it will work and do what I'm looking to do yet but that one step in the right direction.

I appreciate all the help.

Gary

 

2026-07-23 05:30:35
Hinar.Joestar wrote:

Happy to help! Good luck with the rest of the project!

2026-07-23 09:20:34
2 Replies
2026-07-22 10:00:26


OK here is some of what it is giving me. I tried going back to 
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/inferencing_engines/tflite_micro.h:409:(.text._Z32run_nn_inference_image_quantizedPK10ei_impulsePN2ei11ei_signal_tEP19ei_impulse_result_tPvb+0x5a4): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/inferencing_engines/tflite_micro.h:414:(.text._Z32run_nn_inference_image_quantizedPK10ei_impulsePN2ei11ei_signal_tEP19ei_impulse_result_tPvb+0x5b0): undefined reference to `ei_read_timer_us()'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/inferencing_engines/tflite_micro.h:430:(.text._Z32run_nn_inference_image_quantizedPK10ei_impulsePN2ei11ei_signal_tEP19ei_impulse_result_tPvb+0x5fe): undefined reference to `ei_read_timer_us()'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\AppData\Local\arduino\sketches\0539FB191B038666441A74058BC84D82\sketch\edge_camera.ino.cpp.o: in function `process_impuls\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:325:(.text.process_impulse+0x12e): undefined reference to `ei_read_timer_us()'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:262:(.text.process_impulse+0x1ae): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:284:(.text.process_impulse+0x22a): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:284:(.text.process_impulse+0x233): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:300:(.text.process_impulse+0x29b): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:305:(.text.process_impulse+0x2d4): undefined reference to `ei_run_impulse_check_canceled()'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:329:(.text.process_impulse+0x387): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:343:(.text.process_impulse+0x39b): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:335:(.text.process_impulse+0x3be): undefined reference to `ei_printf_float(float)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:336:(.text.process_impulse+0x3c7): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_run_classifier.h:338:(.text.process_impulse+0x3de): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\AppData\Local\arduino\sketches\0539FB191B038666441A74058BC84D82\sketch\edge_camera.ino.cpp.o: in function `loop()':
C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:198:(.text._Z4loopv+0x16): undefined reference to `ei_sleep(long)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:206:(.text._Z4loopv+0x36): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:216:(.text._Z4loopv+0x97): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:226:(.text._Z4loopv+0xbf): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:232:(.text._Z4loopv+0xd3): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:249:(.text._Z4loopv+0xec): undefined reference to `ei_printf(char const*, ...)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\AppData\Local\arduino\sketches\0539FB191B038666441A74058BC84D82\sketch\edge_camera.ino.cpp.o:C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:249: more undefined references to `ei_printf(char const*, ...)' follow
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\AppData\Local\arduino\sketches\0539FB191B038666441A74058BC84D82\sketch\edge_camera.ino.cpp.o: in function `ei_impulse_state_t::ei_impulse_state_t(ei_impulse const*)':
c:\Users\Alfaf\OneDrive\Documents\Arduino\libraries\src/edge-impulse-sdk/classifier/ei_model_types.h:262:(.text.startup._GLOBAL__sub_I__ZN2ei8spectral10processing20spectral_power_edgesEPNS_9ei_matrixES3_S3_S3_f+0x1c): undefined reference to `ei_malloc(unsigned int)'
C:/Users/Alfaf/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2601/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Alfaf\AppData\Local\arduino\sketches\0539FB191B038666441A74058BC84D82\sketch\edge_camera.ino.cpp.o: in function `setup()':
C:\Users\Alfaf\Desktop\Arduino\libraries\Person_Detection_inferencing\examples\edge_camera/edge_camera.ino:179:(.text._Z5setupv+0x7b): undefined reference to `ei_sleep(long)'
collect2.exe: error: ld returned 1 exit status
exit status 1

userHeadPic Gary.Trauth
Hinar.Joestar wrote:

Thanks for sharing the error. It looks like the Edge Impulse library may be installed incorrectly or in two different locations.

 

The example is being opened from:

Desktop\Arduino\libraries\Person_Detection_inferencing

 

but some Edge Impulse files are being loaded from:

OneDrive\Documents\Arduino\libraries\src

 

The src folder should be inside the Person_Detection_inferencing library folder. Otherwise, the source files that provide functions such as ei_printf(), ei_sleep() and ei_read_timer_us() may not be linked.

 

Please close Arduino IDE, remove the stray libraries\src folder and any duplicate copies of Person_Detection_inferencing, then reinstall Person_Detection_inferencing.zip using:

Sketch > Include Library > Add .ZIP Library...

 

After restarting Arduino IDE, open the example again from:

File > Examples > Person_Detection_inferencing > edge_camera

 

Please let us know if the error changes after reinstalling the library, maybe some details is different at your view, just tell us whats wrong new or you success :)

2026-07-22 11:49:05
1 Replies
2026-07-21 09:14:07

Hi there, I would avoid frame comparison for this project. It detects movement rather than a person, so it can become unreliable when the camera starts rotating or when there is movement in the background.

 

The ESP32-S3 AI Camera already has an official Edge Impulse person-detection example:

https://wiki.dfrobot.com/dfr1154/docs/21372

 

Source code and the model are available here:

https://github.com/DFRobot/DFR1154_Examples/tree/master/6.3%20edgeimpulse

 

You can use the detected person's horizontal position and compare it with the center of the image. If the person is left or right of the center, send that position to the Romeo Mini and move the pan servo a small amount.

 

This older project may also be useful as a reference for the servo tracking logic, although it uses a different ESP32 camera board:

https://github.com/AshishA26/Turret-Face-Tracker

 

Since the children maybe wearing costumes, person detection will probably work better than face detection. I would first get the official person-detection example running, then add the servo movement in small steps with a center dead zone to prevent shaking.
 

userHeadPic Hinar.Joestar
Gary.Trauth wrote:

Thank you,

I attempted to use the person detection off of dfrobot wiki but could not seem to get it to compile. I will look at the one on github and see if the instructions are clearer.

thanks again

2026-07-21 11:00:30
Hinar.Joestar wrote:

You're very welcome, and thanks for the feedback.

 

Or could you share the compile error shown in Arduino IDE? Copy the first error message above `exit status 1`, or attach a screenshot of the full output. Maybe we can help you find the problem : )

2026-07-22 09:21:27
2 Replies