I am making an object detection rover ,using the uno and esp32 cam ai thinker ,
I've put tiny ml onto the esp32 cam for object detection ,
and now I want to make it send commands to my uno which will inturn drive the motors
there are no tutorials available on this topic
I've even tried hardware serial but I don't think the cam module has another uart port
It'd be of great help is somebody shows me the way out
EDIT:-
Guys I am using this esp32 module not the wroom one!!!
Ditch the Uno and drive the motors directly, should have plenty of pins on the ESP32.
i have to drive 5 servos, 4 dc motors , 1 hc sr04 , for which I choose the arduino
Here is the full page from where that pinout comes;
Read it and work out which pins are free to use for the serial connection.
ill do that thanks buddy
im a total newbie and was thinking if swapping the uno with an esp32 board and using esp now for communication would help ,
what do you suggest ?
Add a shift register to run your motors.
okay but wouldnt it be to intensive for the esp32 cam ? like running the ml model and making the motors and servos run ?
Shifting out 8 bits is not much of a challenge for a dual core 250MHz uC.
For a car you will not need too many motor changes per second to have much of an impact. In fact, you'd likely have to use more time sending a serial command to do the same.
BTW, all this assumes that you are using a dual h-bridge to properly power your motors.
In the case where a ESP32CAM without PSRAM, I'd not do the project.
In the case of a ESP32CAM with PSRAM and I need extra I/O ports I use a
Serial Wombat 18AB I2C / UART Smart I/O GPIO and Analog Expander for Arduino
I FTP the images to a RPi for ML processing.
we dont get this expansion board in India ,I think ill go with this idea tho
yes i am using a l298n dual h bridge driver
Try a 595 shift register.
can you help me with the Hardware serial library ?, I am not able to use other gpio pins as serial ones, only the UOR and UTX pins are working as serials
Then its unclear as to the question your asking, if UOR and UTX are working as a serial port, you can use them.
Doe your project use the SD card ?
no it doesnt have sd card , i managed to get a serial connection with the uno and esp32 cam , the uno messages sent are read by the esp, but when I send messages from the esp32 cam module , it looks somewhat like boxes and diamonds
Sounds like the transmitter and receiver are not using the same baud rate.
If your not using the SD card, then the pins normally used by the SD card can be used for other stuff.
Yes I used pins 14 and 15 as rx Rx using hardware serial
The thing is it was working fine at first both sides could communicate the string i entered in the serial monitor
Now the esp sends boxes instead of a string
We dont know exactly what you were doing, or the code used, that was 'working fine' or the code that now justs results in 'boxes'.