Introduction: Open Hardware Rover With Arduino and Raspberry Pi

This Rover is based on Arduino and Raspberry PI 2.

The way to operate the rover and use the camera, is using a Wiimote and Nunchuk connected with the Arduino by a Bluetooh connection.

On the one hand, Arduino controls the servos and the brushless motor.

On the other hand, Raspberry Pi2 manages the video streaming send to the PC that you can watch in VLC.

Step 1: Materials

- RC Car (or something like this): I am using Survolt BX10 first generation.

- Arduino Uno.

- Arduino USB Shield.

- Bluetooh 4.0 Dongle: I am using this -->

- Raspberry pi 2 or 3.

- Wifi module for Raspberry.

- Pi camera V2

- Camera mount for 2 servos.

- 2 X servo.

- A lot of wires.

- Batteries, power banks.....

- Wiimote and Nunchuk.

Step 2: Setup the Raspberry Streaming

I am using the last Raspbian distribution at the date 26/8/2017

The first is to install the VLC in our Raspi.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vlc

Now you have the VLC installed. The next step is setup the video stream.

The easiest way is making one script that we can launch:


raspivid -o - -t 0 -hf -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264

In this moment we have the stream prepared.

Don't forget to install the VLC in your computer!!

Step 3: Arduino Diagram

You have to connect all like it is in the picture.

The ESC's power pin don't have any connection.

Over the Arduino UNO you have to use the USB shield with the Bluetooh dongle in the USB port

Is important use the pins 2, 3, 4, 5, 6, 7 and 8 for the servo signal, because the rest of the pins are use for other kind of comunications with the USB Shield and the servos in the rest of pins don't work.

You can powered the Arduino with your favorite kind of battery.

Step 4: Arduino Code

/* You have to install in your Arduino IDE the USB Shield library */

#include  <Servo.h>
#include <Wii.h>
#include <usbhub.h>
// Satisfy the IDE, which needs to see the include statment in the ino too.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#include <SPI.h> #endif
#define PINCAMERAY 2 
#define PINCAMERAZ 3
#define PINSERVO 4
#define PINMOTOR 5
#define STARTPWM 116
 * Wiimote code
USB Usb;
//USBHub Hub1(&Usb); // Some dongles have a hub inside
BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
/* You can create the instance of the class in two ways */
WII Wii(&Btd, PAIR); // This will start an inquiry and then pair with your Wiimote - you only have to do this once
//WII Wii(&Btd); // After that you can simply create the instance like so and then press any button on the Wiimote
bool printAngle=false;
 * Servo code
 * For servos items we have to use PIN: 2, 3, 4, 5, 6, 7, 8
int pulsoMotor=103; //Initial valor to initialice the ESC, if you are using a different esc, this valor maybe change.
int pulsoDireccion=90; // Initial valor for the direction servo
int direccion=0;
Servo servoY,servoZ,servoD, motor;
byte recibiendoByte ;
boolean iniciado = false;
int x,y, mov, dire;
void setup() {
   * Setup servos
  while ( iniciado==false ){
          motor.write(0);   // Armado
   * Setup Wii
#if !defined(__MIPSEL__)
  while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
  if (Usb.Init() == -1) {
    Serial.print(F("\r\nOSC did not start"));
    while (1); //halt
  Serial.print(F("\r\nWiimote Bluetooth Library Started"));
void loop() {
  if (Wii.wiimoteConnected) {
        if(mov > 117)
          if(mov <100)
        if(dire <170)
          if(dire > 190)
      if (Wii.nunchuckConnected) {
        if (Wii.getAnalogHat(HatX) > 137 ||  Wii.getAnalogHat(HatX) < 117 || Wii.getAnalogHat(HatY) > 137 || Wii.getAnalogHat(HatY) < 117) {

Step 5: Build the Rover

Now is the moment to mount all the things over our platform.

You can use your creativity in this step to make your oun rover.

Step 6: Run the Rover

In this point we have all the things prepared to start the Rover.

1 - Connect the batery to the ESC and power on the ESC (in this point you maybe obtain 2 bips in the ESC)

2- Charge the program on the Arduino (in this point you have to have other bip for confirmation)

3- Power on the wiimote pussing 1 and 2 at the same time.

4- Power on the Raspberry Pi 2.

5- Execute the Script to initialize the Streaming.

6- In the VLC program on your computer go to Media-> Open network, in this window you have to use this direction: http://yourraspberryIP:8090

You can watch the proccess in this video, Sorry I am Andalusian Spaniard :)

The Video Stream have a 3-5 seconds delay.

Enjoy the Rover!!!!

First Time Author Contest

Participated in the
First Time Author Contest

Bluetooth Challenge

Participated in the
Bluetooth Challenge