OTTO DIY evolves with ESP32 support
This time I would like to mention that we upgraded the OTTO DIY project giving it the power of the esp32 support. As our reader knows we love robotic and expecially myself I love to contribute to opensource robotic projects ( Check also the WIP Otto Zero ) !
ESP32 vs Arduino Nano as brain:
The ESP32 is now cheaper and a a viable alternative to the Arduino Nano, it’s also faster and the full build require less components as it includes wifi and bluetooth. Also having a bigger memory it can finally surpass the current limitations and it has more space for code , Led Matrix faces, servos ( for arms for example ) , sounds and sensors.
You can download the code from the official Github repository
Technicals:
The Esp32 version of OTTO library ( OTTOESP ) required some changes from the original library in the references of Oscillator.h and Servo.h library to make compatible with ESP32Servo library. You can use those libraries alongside the standard otto library.
Installation:
- Copy “libraries” folder in your Arduino/libraries folder
- Edit Otto_esp32.ino and choose your leg pins (default are IO 14,27,16,25)
- Press the “Flash” ( or “Boot”) button on your ESP32 board before uploading the code.
Schematics:
Same as OTTO DIY 🙂 !
Future:
- Standardize library
- Add bluetooth support
- Add wifi controlling capability
Looking forward to see your contributions 🙂 !
-Marco
the schematic isn’t the same as the arduino nano
the ESP32/8266 pinouts ar enot the same
Yes you need to edit them in the code 🙂
Hello Marco,
i’m testing the Otto_ESP32 module, but sadly it doesn’t work as expected.
With the “Otto::walk” and “Otto::moonwalk” function, one servo does not react.
But with the “Otto::shakeLeg” funktion, the servo works.
I have uploaded an example video at: https://youtu.be/__LjsOBxNMc
Used “loop” function:
void loop() {
Otto.home();
delay(1000);
Otto.walk(STEPS,T, FORWARD);
Otto.home();
delay(1000);
Otto.shakeLeg(STEPS, T, LEFT);
Otto.home();
delay(1000);
Otto.shakeLeg(STEPS, T, RIGHT);
Otto.home();
delay(1000);
}
Maybe you can give me a hint, where my error is?
Thanks, Greetings Jürgen
Hi Jurgen, I suppose the library is output an angle over 180 degree for that servo. Maybe a calibration can help , I suppose it’s an error on the library so meanwhile I’ll check the angles. I’ll let you know
Hi Marco, first of all, thanks for taking time to modify libraries for ESP32 as this is a much more versatile platform than the “classical” Arduino.
I have run into the exact same issue as described by Jürgen, 3 servos are working great, the last one just goes to the mechanical end stop.
Hope that someone can come up with a solution on this.
I’m looking into it! I’ll follow back in some days 🙂 kind regards Jesper
Hi Jesper, try to change the pins of the board in the code ( to use PWN Pins only). It may help
Hi Marco,
I tried with other pins also but same result. Can you please share you MCU model in which it is working fine for pin 25. I will try replicating same.
Hi Priyank, I’m using a Arduino ESP D1 R32 from WEMOS, the configuration use the following pins : io14, io27, io16, io25 (are labeled in this way, I’m not sure why) .
this is the board https://www.cnx-software.com/wp-content/uploads/2017/09/ESPUINO-32.jpg
Did you try to use the latest github version of ESP32Servo from madhephaestus in which I fixed several bugs?
https://github.com/madhephaestus/ESP32Servo