REMOTE CONTROL
What We Need To Prepare
Remote Control Base
ESP32 Expansion
Joystick
no engineering drawing
screw size 3mm
hole size 3.2mm
Joystick
Using dupont wires, connect the joystick to the ESP32 as follows…
Joystick ESP32�GND G (innermost row)�+5V V (middle row)�VRX D32�VRY D35
D35
D32
G
V
Get MAC address from Rover’s ESP32
Use “Get Device Info” to obtain the MAC address of the Rover
Note down this MAC address, you’ll need it when programming the remote control
JOYSTICK
center value of the joystick
Joystick Center Value
check the pin
Example of Joystick Center Value
You can also test moving the joystick forward/right (...value should increase) and back/left (...value should decrease)
example of joystick center value (around 30500)
write down the center value
Joystick Control Value
Let’s set the joystick control value to:
0
65535
Example
0
30500
29500
31500
-1
1
Example
check the pin
Do the similar for left joystick
LEFT JOYSTICK X
LEFT JOYSTICK Y
ESPNOW
1
2
JOYSTICK
ESP NOW
Key in the Rover’s ESP32 MAC address
JOYSTICK
Initialise ESP NOW
Before we can send messages to the Rover, we must add the Rover’s brain as peer
JOYSTICK
Check the joystick value
Joystick X and Y
Robot Movement
JOYSTICK
Preparing Left Joystick Data
JOYSTICK
Preparing Right Joystick Data
JOYSTICK
Send The Joystick Data to Rover
Install the following extensions:
ROVER
Installing Extensions
ROVER
Initialise all the components
ROVER
Initialise all the components
ROVER
Wait for the Start (Boot) Button
ROVER
Save the message
If there is, get the message and save it in the “receive” variable
Check if there are new message to read
ROVER
Split The Message
Split the string into multiple shorter strings, using a comma as a delimiter. Save the result in “cmds”
Get the second item in “receive” and decode it into a string of text. (the first item contains the sender address)
ROVER
Convert The Message