-
1Assemble the chassis
Mount the motors to the SMARS chassis and connect them to the L298P motor driver shield. Stack the shield onto the D1 R32.
-
2Wire power
Connect the 9v battery to the motor driver's power input. This ultimately powers the entire system.
-
3Flash the ESP32
Fill in your WiFi credentials and HiveMQ Cloud credentials in main.cpp and flash the firmware. On boot the ESP32 prints its IP and connects to the MQTT broker
-
4Set up HiveMQ Cloud
- Create a free cluster at hivemq.com
- Create a credential with a username and password
- Grant it Publish and Subscribe permissions
- Copy your cluster URL into main.cpp
-
5Set up the web dashboard
- Place
index.htmlandbroadcast.htmlin the same folder - Run
python3 -m http.server 8000in that folder - Run
ngrok http --url=YOUR_NGROK_DOMAIN 8000in a second terminal - Open
https://YOUR_NGROK_DOMAIN/index.htmlon your laptop - Open
https://YOUR_NGROK_DOMAIN/broadcast.htmlon the phone
- Place
-
6Start running system!
- The ESP32 serial monitor should print "MQTT conntected"
- The dashboard should show "Connected"
- Press Start Broadcast on the phone and video should appear in the dashboard
- Use WASD keys to drive the robot
Donavan Borges
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.