Introduction: Using Arduino Leonardo As Mouse and Keyboard, Controll by Bluetooth.

About: motaz bany-amer!! jordan 2/7/1994 Yarmouk university - jordan work at Genotronex lab, IEEE YU Robotics Team, YES yarmouk engineering students, hijjawy art engineers. =-=-=-=-=-=-=-=-=-=-=-=-=-=-= facebookhtt…

One awsome feature in Arduino Leonardo, which make it special board, is that it can act as mouse and keyboard on computer. this could be usefull to controll the computer by different way, such as joy stick and here BLUETOOTH!

things used here are :

*Arduino Leonardo board

*USB cable

*HC-05 bluetooth adabter ( that i got from genotronex store - jordan)

In this project we gonna controll the computer mouse pointer and keyboard input from the arduino leonardo board.

this instructable is availble in arabic in genotronex blog.

Step 1: Connect the Bluetooth

the bluetooth adabter HC 05 use the serial comunication to connect to the arduino, so we gonna use #Software Serial library to connect to it.

the software Serial is much like the Arduino hardware Serial(that it done by UART) but here it done by software method.

as I defined the Software Serial Tx and Rx pins to 8 and 9

the bluetooth sould be connected :

bluetooth Tx to arduino Rx pin (pin9)

bluetooth Rx to arduino Tx pin(pin8)

as shown in the image.

to learn about the arduino Software Serial library you should refere to the Arduino Reference

Step 2: Leonardo As a Mouse

making leonardo appear as a mouse to the computer is much easy.

there is a Build-in library in the arduino, this library used with leonardo, DUE, and micro boards, and it so easy to work with.

to learn about it you should refer to Arduino Reference.

to work with bluetooth you need to other teminal, I used my android device to controll the arduino.

there is a good app in the store called Arduino Bluetooth Controller. this app connect to the HC 05 and send 'char' data to the arduino, and you can modify the char sent by each button on the app with "Set command".

Step 3: Leonardo As Keyboard

The same things done to make arduino appear as a mouse is done here, but you set it to act as a keyboard.

and here you should use a different app, one that send 'strings' not only some 'char'. I used an app called Bluetooth Terminal.

here I sent words from my android to arduino to be printed on the text editor.

this is all I have here.

ENJOY !