Esp32 DevKit v1

Esp32 DevKit v1 by Espressif

Connection Type
Wi-Fi
Number of servos
25
Audio Support
No
Camera Support
No

Firmware


The DOIT Esp32 DevKit v1 is a very affordable WiFi module with plenty of IO, including three hardware UARTs. Adding the firmware below makes the WiFi module an EZB that ARC can connect to. This firmware works with ARC versions greater than or equal to 2019.06.25.00.

*Note: For servo use with EZ-Cam, only pins 2,4,12-19,21-23,25-27,32-33 are recommended.



Video Tutorial


WiFi Modes

The code supports two WiFi modes: AP Mode, which turns the ESP32 into a WiFi server your computer connects directly to, and Client Mode, in which the ESP32 connects to your network router. You can view the IP Address and connection status information by viewing the Serial Monitor set to 115,200 in Arduino IDE.


Port Configuration

The pins in ARC are labeled D0 - D23. The ESP32 has GPIO-labeled pins, which are not in any ordered sequence. This translation chart below shows the mapping of the ESP GPIO to ARC Dx pins. The ports labeled TX/RX are the hardware UART ports, which correspond to hardware UART #0 in ARC.


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

PRO
Synthiam
#33  

I wouldn't bother with the adafruit servo controller because the communication is slow and a little wonky with i2c.

You'd get more out of an Arduino with a servo shield. Simply connect the Arduino's RX and TX to the TX and RX of the ESP32 cam.

Once you do that, the firmware change is minor on the esp32. All you need to do is a while () loop that passes TCP to the UART and vice versa. All of the EZB code is removed.

#35  

To compile on Arduino IDE 2.0.3 I had to change line 591 to: analogWrite(translateaDigitalPort(port), (uint16_t) map(pos, 0, 100, 0, 255));

I'm assuming here it is supposed to use the included analogWrite and not the Arduino included one?

PRO
Synthiam
#36  

I don't think an Arduino analog write exists for the ESP Arduino library. At least at the time of the firmware creation, there wasn't. It shouldn't matter which one you use if there happens to be an Arduino AnalogWrite installed with the ESP package.

But i think you need to be casting the value to a uint8_t not a uint16_t. Because it's only a byte from 0-255. I mean, the 16bit int will work but it's unneeded extra bits:)

#37  

Gotcha. I commented out analogWrite and moved the files out of the project and it compiled. Looks like it was included November 2021 since version 2.0.1 so after the firmware was written.

esp32/hardware/esp32/2.0.6/cores/esp32/esp32-hal.h:void analogWrite(uint8_t pin, int value);

Aside from that error the rest of the firmware compiled fine.

PRO
Synthiam
#38   — Edited

that's good to know - i might have to revisit that firmware and remove the analogwrite.h to use the built-in one.

so you got it working then?

#39  

Yeah I'm just sitting at my bench with multimeter testing the PWM's on the pins. Works great.

p.s. nabu'er here as well :-) actually that's how I found ARC. It's just a hobby of mine and learning ros2 was not fitting into my schedule anytime soon.

PRO
Canada
#40  

I was really impressed how well the ESP32 worked with ARC.  I think if someone sat down and built a free 3D printed opensource series of robots like a robot humanoid, robot hexapod, robot car etc based on the ESP and called it something like ES-Robot, it would be a huge success for schools and hobbyists  :)