Drive a Rover (Toy Car) Over the Internet
by LimitOS in Circuits > Remote Control
360 Views, 1 Favorites, 0 Comments
Drive a Rover (Toy Car) Over the Internet
![Internet-controlled Rover](/proxy/?url=https://content.instructables.com/FLT/8RYW/JW0Y367W/FLT8RYWJW0Y367W.jpg&filename=Internet-controlled Rover)
![rover_assembled-08000c8025577746c406b509063e719bac8524ff79b1569a4074b8d942fd36ff.jpg](/proxy/?url=https://content.instructables.com/FKU/DOYY/JW0Y35ZN/FKUDOYYJW0Y35ZN.jpg&filename=rover_assembled-08000c8025577746c406b509063e719bac8524ff79b1569a4074b8d942fd36ff.jpg)
What you'll be building
This tutorial teaches you how to build a rover that can be driven using your mobile phone. It includes a live video feed and a control interface for driving. Since the rover and your phone both have internet access, the toy car can be controlled from across the world.
Requirements and Materials
Raspberry Pi connected to the internet
Chassis Components: Zumo chassis kit, 2 micro motors, L298N module, 4 AA batteries
External Power Source, for example the Anker PowerCore+ Mini
Wires, tape, foam packing material, rubber bands
Build the Chassis
![chassis-71fd1a07d398168e83b77cb6fba80524ef055b4d2ab2574b1c793a89571bb188.jpg](/proxy/?url=https://content.instructables.com/FQX/HAL6/JW0Y35YY/FQXHAL6JW0Y35YY.jpg&filename=chassis-71fd1a07d398168e83b77cb6fba80524ef055b4d2ab2574b1c793a89571bb188.jpg)
Follow the first 6 minutes and 15 seconds of this tutorial video to build the chassis.
Add the Raspberry Pi and L298N Module
![chassis_with_pi-66fcf8c270ba6724081d7a4d08ba019a9d196753ffab7e8e11a2a0c6a764452a.jpg](/proxy/?url=https://content.instructables.com/FGV/XFMO/JW0Y35YX/FGVXFMOJW0Y35YX.jpg&filename=chassis_with_pi-66fcf8c270ba6724081d7a4d08ba019a9d196753ffab7e8e11a2a0c6a764452a.jpg)
Cut out a piece of foam to act as a cushion between the Raspberry Pi and chassis, and another piece of foam to sit between the Raspberry Pi and L298N Module. Then attach them to the chassis using rubber bands. Connect the Raspberry Pi Camera.
Connect the Circuit
![remote_car_circuit-b20da06805e479e53418fab177ce5ce0a20ac88198734f7189bb8015739d31ec.png](/proxy/?url=https://content.instructables.com/FR7/5WQX/JW0Y35ZM/FR75WQXJW0Y35ZM.png&filename=remote_car_circuit-b20da06805e479e53418fab177ce5ce0a20ac88198734f7189bb8015739d31ec.png)
![rover_assembled-08000c8025577746c406b509063e719bac8524ff79b1569a4074b8d942fd36ff.jpg](/proxy/?url=https://content.instructables.com/FKU/DOYY/JW0Y35ZN/FKUDOYYJW0Y35ZN.jpg&filename=rover_assembled-08000c8025577746c406b509063e719bac8524ff79b1569a4074b8d942fd36ff.jpg)
Connect the motors to the sides of the L298N module. Connect pins 19, 20, 21, and 26 to the control pins of the L298N module. Connect a ground wire between the Raspberry Pi and the L298N module, and finally connect the batteries (located underneath the chassis) to the L298N's ground and +12V.
Add some foam insulation under the external power source, and secure it using rubber bands. Tape the camera to the device to prevent it from moving while driving. Connect the power source to the Raspberry Pi, and add the wheel treads if you haven't done so already.
Enable the Camera
![pi_camera-3a0d9a1b286addec72792fcfded3c153e53c5c19489b5010cb23a4f2493721d6.jpg](/proxy/?url=https://content.instructables.com/FVB/GK8I/JVMNRAJK/FVBGK8IJVMNRAJK.jpg&filename=pi_camera-3a0d9a1b286addec72792fcfded3c153e53c5c19489b5010cb23a4f2493721d6.jpg)
The camera must be enabled on the Raspberry Pi using the command:
sudo raspi-config
Visit the official documentation for more info.
Run LimitOS on the Raspberry Pi
![limitos run.GIF](/proxy/?url=https://content.instructables.com/FK5/0ZKS/JX16DD2O/FK50ZKSJX16DD2O.gif&filename=limitos run.GIF)
LimitOS runs alongside your existing operating system, and can be run via:
curl -sS https://limitos.com/run | bash
Follow the on-screen instructions to register the device afterwards.
Enable LimitOS Video
![enable_video-5e030a115faf4342cd54d42c05173000653d35157fb2cc6b5c64348111d8a99b.gif](/proxy/?url=https://content.instructables.com/FYG/0XQ7/JW0Y35ZA/FYG0XQ7JW0Y35ZA.gif&filename=enable_video-5e030a115faf4342cd54d42c05173000653d35157fb2cc6b5c64348111d8a99b.gif)
After registering your device, you'll be on the LimitOS website at https://limitos.com . From there, go to your device by clicking "My Devices" and selecting your device. Then click "Edit Device" and make sure to check the "Enable live video" checkbox. If your video appears upside down, you can also come back here later to invert the video.
Set Up the Pins
![rover_pins-bf95eb350f8b52a6208b2de378c8bf807a30c7239348fdc57cae6dda98079f28.gif](/proxy/?url=https://content.instructables.com/F76/WSGV/JW0Y360C/F76WSGVJW0Y360C.gif&filename=rover_pins-bf95eb350f8b52a6208b2de378c8bf807a30c7239348fdc57cae6dda98079f28.gif)
On your LimitOS device page, add pins 19, 20, 21, and 26 as the "output - digital" pin type. Test out each pin individually using the controls at the bottom of the page, and then name each pin accordingly.
Set Up the Control Interface
![rover_pin_mapping-5f16228592f713c60606e6b59b87f7758da290415e76856234fcb70f96970075.gif](/proxy/?url=https://content.instructables.com/FDN/CX4I/JW0Y3600/FDNCX4IJW0Y3600.gif&filename=rover_pin_mapping-5f16228592f713c60606e6b59b87f7758da290415e76856234fcb70f96970075.gif)
On the LimitOS website, click the icon next to "Device Controls" to access the control interface. Click the gear icon to edit the interface, select the "Drive" control template, allow public access if you'd like, and then map your pins appropriately and save the changes.
You should now be able to drive your rover around!