Project 5 - Making a USB Accelerometer Mouse

Demo Video

Summary

When you connect an Arduino Yún to a computer using a micro-USB cable, the computer identifies the Yún as a serial port. This allows the Arduino IDE to upload sketches, and you can communicate with the Yún from any terminal software that supports serial connections.

Because the ATmega32u4 is programmable, you can make the Arduino Yún appear as different types of USB device. The Arduino IDE compiles sketches so that they include the option of using the Yún as a mouse or keyboard.

This project reads values from an accelerometer sensor module and uses this information to move the mouse pointer – it creates a prototype controller that you use by tilting the Arduino.

Parts List

  • An Arduino Yún
  • A USB to micro-USB cable
  • An MPU-6050 triple-axis accelerometer and gyroscope breakout board - available from: SainSmart, SparkFun, GeeeTech, RoboShop
  • Two 10 kΩ resistors
  • Two momentary push buttons
  • A mini breadboard from an Arduino ProtoShield
  • Jumper wires

Useful Links

Circuit Diagrams

Source Code Download Here

ArduinoMeetsLinux-P5.ino

Start Building Today

book cover Start Reading Now

Your guide to Yún developement. Arduino Meets Linux includes:

  • Over 320+ pages of content
  • OpenWrt-Yun Linux tutorials
  • Python and shell scripting
  • 7 in-depth Arduino projects

Take your Arduino projects to the next level. This book shows you how.