Control 2 servomotors over WiFi TCP with ESP32-WROVER-B and RoboRemo Joystick
We used an ESP32-WROVER-B board, but other boards should work as well.
The number of servos can be easily extended up to 10. Make sure to configure the PWM output pins according to your circuit.
const int chCount = 2;
const int servoPin[chCount] = {13, 12};
The ESP creates its own WiFi Access Point named mywifi
with password qwerty123
.
Then it starts TCP Server on IP 192.168.0.1
port 8080
.
menu -> edit UI
click on blank space -> add joystick, drag to move, resize
click on joystick, configure:
X axis ID ch0
, output int, min. 1000
, max. 2000
, auto return to mid
.
Y axis ID ch1
, output int, min. 1000
, max. 2000
, auto return to mid
.
send space after ID checked
Android WiFi sttings -> connect to AP mywifi
Open RoboRemo app -> menu -> connect -> Internet (TCP) -> 192.168.0.1:8080
Move the joystick in RoboRemo -> see the servomotors move.
Make sure you have a decent power supply. Weak power supply may result in ESP restarting.
For our tests we used our lab power supply set to 5V for the servomotors and USB cable for the ESP.