Hover... What it it? Well I am afraid to say that it does not grant you the ability to fly off the ground and bunk off school (I shouldn't be saying this, it is summer holidays!) However, it is pretty exciting. You may have seen my article about the Leap Motion (see here), and it is a little similar to that, except that it does work with the Raspberry Pi (as well as arduino and similar), Hooray! This opens up loads of new opportunities, such as using it to control robots and the like! As well as hand gestures (Forward swipe, Back swipe, Left swipe and Right swipe) it is also a simple touchpad like you might find on a laptop. This can recognise taps in five places, (North, South, East, West and Centre). You can buy a Hover here.

There is a video of this in action on the right :) -->

The board is simply fixed to the Pi with a breadboard, and some simple wiring, then can be controlled with some simple code, that I will explain later on. Simple :)

So, before I take you through setting it up, what will you need?

At minimum:

  • Hover 
  • Breadboard
  • 1 Male to Male jumper lead
  • 6 Male to Female jumper leads
  • Raspberry Pi Model B (Not B+)
  • Internet connection for the Pi
  • USB Stick
  • Windows computer (Or Mac, but instructions are for Windows)
  • Internet connection for Windows Computer.
hover_raspberrypi-master.zip hover_raspberrypi-master.zip
Size : 1392.035 Kb
Type : zip

Here you can see the Hover being used to make an LED flash. If you would like the code for this, please contact me through the form on the Homepage of this site, found here.

I2C is commonly used to allow one chip to talk to another. Like the Raspberry PI and Hover.


It's time to do the Hardware!

  1. Collect your equipment listed at the top of the page. 
  2. Wire the Raspberry Pi and Hover together as in  the diagram on the right. DISCONNECT THE POWER SUPPLY FROM THE PI BEFORE DOING THIS!
  3. Power up the Raspberry Pi, Login and start the GUI. 
  4. Open LXTerminal and type:                                          cd hover_raspberrypi-master.zip
  5. Type: sudo python Hover_example.py
  6. You can now touch the touchpads, or swipe your hand across, and the corresponding action should be displayed on the screen!
  7. If you are feeling more adventurous, try the example drum program, where different drum sounds are played when you tap or swipe. Simply type: sudo python Hover_drum.py in step 5. Make sure that you plug in some speakers or headphones, and you have configured the sound correctly, following the instructions here.

NB - If you are using a Raspberry Pi Version 1, you need to change the Hover_library.py file line 27 to use SMBus 0 instead of SMBus 1. The default library is setup for Raspberry Pi version 2.    

 Before we start setting up the hardware side of things, the Software must be ready to go.  

On the Windows computer:

  1. Insert the USB stick.
  2. Download the file on the left.
  3. Locate the .zip file in the Computer's 'Downloads' folder.
  4. Right click on the file and select 'Extract All'
  5. When the window pops up, click 'Browse' then select the  USB stick.
  6. Click 'OK' then 'Extract'
  7. When this has finished, remove the USB stick from the computer.

On the Raspberry Pi:

  1. Insert the USB stick. 
  2. Boot up, login and open the GUI (command startx).
  3. Open 'File Manager'
  4. Double click on the USB stick (on the left)
  5. Drag the entire folder (hover_raspberrypi-master) to the    bit on the left reading 'Pi' (or your username if changed). Drop.
  6. Open LXTerminal.
  7. Type 'sudo apt-get update', press enter and wait.
  8. Then, 'sudo apt-get install python-dev'
  9. Finally, type 'sudo apt-get install python-rpi.gpio'. You will probably be prompted to press 'y',     and press enter to confirm.
  10. Reboot. This can be done by typing 'sudo reboot' into    the command prompt (LXTerminal)
  11. When the Pi is ready, login and start the GUI again    (startx).
  12. Open LXTerminal and type 'sudo nano /etc/modules'. This will open a tiny program that controls the workings of the pi. You need to enable the Pi    to use i2c, by adding the following lines of code to the bottom of the existing code:  'i2c-bcm2708', 'i2c-dev'. It should now look like the picture on the left. 
  13. Close and save this program by pressing Ctrl + X, followed  by 'Y', then Enter.
  14. You now need to install two more things. In LXTerminal,  type: 'sudo apt-get install python-smbus' and press enter.
  15. Now type: 'sudo apt-get install i2c-tools'. Press enter. 
  16. Next, you need to edit another program that tells the Raspberry Pi not to use i2c. This is to help people who    don't want to use this system, but we need to use it! In LXTerminal, open the file by typing: sudo nano /etc/modprobe.d/raspi-blacklist.conf
  17. You will now need to void the last two lines of code by putting '#' in front of them. Python ignores anything after      a '#'. It should now look like it does on the left.
  18. Exit the editor by pressing Ctrl + X, then 'Y' and finally Enter.
  19. Reboot with 'sudo reboot'

To check that the Raspberry Pi is working with the i2c device connected, type the following into LXTerminal: 

sudo i2c detect -y 1

If you are using a Raspberry Pi Version 1, typethe following instead: 

sudo i2c detect -y 0

If the number 42 appears, you are doing great, however if not, ensure that you have done everything outlined above!