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

Picture of Using Arduino Leonardo As Mouse and Keyboard, Controll by Bluetooth.

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

Picture of 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

Picture of 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

Picture of 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 !

Comments

dottorbiker (author)2015-07-21

hi! thanks for your instructables!
do you think that It can make the same things than bluefruit?
https://www.adafruit.com/products/1535

I'd like to make this:
https://learn.adafruit.com/bluefruit-bluetooth-wir...

thanks

Michele

hello !

sorry for late reply, I had a lot of Exams lately.

i think it can, and the great thing here that you can send any key on this list :

https://www.arduino.cc/en/Reference/KeyboardModifi...

the project you want to do is good, I think you can do it even in better way and add some extra featurs with this arduino.

tomatoskins (author)2015-05-29

Really cool idea!

thx :D

About This Instructable

13,713views

14favorites

Bio: 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. =-=-=-=-=-=-=-=-=-=-=-=-=-=-= facebookhttps ... More »
More by Motaz Bany-Amer:Arduino: Pushing the Limits || Power-plugin timer.Arduino: pushing the limits || Arduino Timers.Using tft itead 2.8 arduino UNO sheild on MEGA
Add instructable to: