I will be showing you how to build a wifi robot from scratch. It is a very straight forward project and can easily be handled by a intermediate robot builder. To complete the robot, it will take a couple of hours. I also attached the android phone with this app ip camera with this robo and connected to the wifi to see live video feed. We need to reduce `Beacon Interval` to 40 instead of 100 (default) if we are using wifi router to command robo with pc/laptop to see real time effect.
Video of complete robot driving:
- Nodemcu esp8266 https://www.amazon.in/ESP8266-NodeMcu-WiFi-Development-Board/dp/B00UY8C3N0/
- Power Bank
- Robot platform
- Motor driver
- Motor as per requirement
- Jumper wires
- Bread Board (Optional)
Attach the motors with the platform, and join wires. Join left side motor black wires together and same for red.
Attach the motor wires with motor driver as shown in the above image.
takeout the current supply wires out from middle hole of platform and data jumper wires. And connect with pines as follows.
IN1 -> D1
IN2 -> D2
IN3 -> D3
IN4 -> D4
connect both the Enable with 3v3 of of esp8266 nodemcu.
My robo is working without connecting GND so I will be skipping that. Other we can attach the GND of nodemcu with GND of motor driver.
Now connect the cables with power bank and the robo is ready
Now the program is in lua. We can control this robo with android app or with pc with linux os.
- App can be found on this link. For using nodemcu softAP function put nodemcu-wifi.lua on nodemcu.
- To control with pc/laptop connect this to the wifi. use the file python-tcp-getch-linux.py to control robo with command line terminal. Put nodemcu-wifi.lua program to nodemcu if you want your robo to connect wifi router at home.
How to flash nodemcu for lua, I will write another post for that.
use this command to put this program into nodemcu with luatool
python esp8266/luatool/luatool.py --port /dev/ttyUSB0 --src init.lua --dest init.lua --restart
Programs are now kept now on github on this link
Dont forget to attach android phone with ip camera app to see live video from android.