ESP8266 Robot Car with ESP8266 Basic
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
- Once, built, add 4 AA batteries to pack and and turn on.
- please note -- weak AA batteries will cause robot to not function well, use high capacity AA batteries if possible. Also, you could upgrade battery pack with a 6 or 8 AA pack to get more power.
- Look for WIFI access point ESP8266CAR and connect.
- Connect to http://192.168.4.1 on web browser
- Click on Files to upload ESP_Robot.bas. (ESP8266 Basic information at link below.)
- Alternativly, open ESP_Robot.bas and cut and paste it into EDIT window.
- Click RUN (Don't worry if car doesn't go direction button indicates)
- click FORWARD and note direction
- click LEFT and note direction
- If car goes wrong direction, then rename functions [forward], [backward], [left], and [right] to match direction that car actually goes. Alternatively, you can swap wires to motor driver until it goes the correct direction... but it is easier to rename the functions.]
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":
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.
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]