ESP8266 Robot Car with ESP8266 Basic
IF you bought your own and want to diy --- Look Below for directions:
IF you bought your own and want to diy --- Look Below for directions:
Directions: (An instructable has been created to help with more detailed instructions.)
1) Download ESPFlasher at link below
2) Download ESPBasic Binary
3) Run ESPFlasher, then click on settings (gears) to select the correct binary -- Make sure correct USB port is selected -- Click Flash
4) Download "ESP_Robot.bas" here.
5) Build car using guide provided
Right now, car will go forward, backward and spin left and right.... to make it more drivable, make changes to code as shown.
To make robot more drivable, modify code for [right] and [left] by adding "delay 250" and "goto [foward]" before "wait":
[right]
io(pwo,5,speed)
io(pwo,4,speed)
io(po,0,1)
io(po,2,0)
delay 250
goto [foward]
wait
[left]
io(pwo,5,speed)
io(pwo,4,speed)
io(po,0,0)
io(po,2,1)
delay 250
goto [foward]
wait
Now your car will turn car for 1/4 of a second, and then proceed straight. Please note that if you do this, you can no longer make your car spin.... unless you add functions [spinRight] and [spinLeft]. You can do this by copying [left] and [right] functions and renaming them. If you do this after you change it, then you will need to delete the lines that you added before.
[spinRight]
io(pwo,5,speed)
io(pwo,4,speed)
io(po,0,1)
io(po,2,0)
wait
[spinLeft]
io(pwo,5,speed)
io(pwo,4,speed)
io(po,0,0)
io(po,2,1)
wait
After you do this, you can add two more buttons to control screen with 3 lines of code in bold below:
button "left", [left]
button "right", [right]
button "spinLeft", [spinLeft]
button "spinRight" [spinRight]
button "backward", [backward]