Arduino Uno/Mega Marcro Keyboard (mainly to Spam in Games)

by Error_Account in Circuits > Arduino

409 Views, 2 Favorites, 0 Comments

Arduino Uno/Mega Marcro Keyboard (mainly to Spam in Games)

sd.jpg
3xeity.jpg

Normally to use arduino as hid device(mouse , keyboard , ect) you will need arduino that have atmega 32u4 microcontroler(pro micro , leonardo , due , ect) because this microcontroler have built-in usb port but if you dont have one you can use arduino Uno or Mega that have atmega 16U2 as serial to usb converter all we have to do is just replace the atmega 16u2 firmware dont worry about ruin your arduino you can always convert it back. In my case i use ps2 keyboard as input devive like your normal button.

Get Your Software and File Ready

1. To program your arduino you will need arduino IDE Link_here

2. To change your atmega 16U2 you will need atmel flip Link_here

3. You also need keyboard firmware to program your 16U2 uart Link_here

4. You also need normal 16U2 uart firmware because you dont want your arduino to be keyboard forever.

For UnoLink_here ForMegaLink_here

5.If you want to use ps2 keyboard as input device so you can have massive marcro key like i did you also need ps2 keyboard libraryLink_here

Install Your Ps2 Keyboard Library and Code!

In arduino IDE click on skecth > include library > add .ZIP library then select zip library file that you have download then restart your arduino IDE

Code:Link_here

Now plug-in your arduino then select board by click on tool >board>arduino AVR board>select your board

then click on tool>port>select your com port that your arduino plug in.

finally click upload your sketch.

Put Your Arduino in DFU MODE

Inked3xeity_LI.jpg
Inkedsd_LI.jpg

short those 2 pins on your arduino as shown in picture.

Install 16U2 Driver to Comunicate With Atmel Flip

Open your device maneger you will see an unknown device right click-on it then select update driver then select browse my computer for driver the location of your driver is C:\Program Files (x86)\Atmel\Flip 3.4.7\usb

Upload Your Atmega16U2 Firmweare

Screenshot 2021-04-17 174132.png
Screenshot 2021-04-17 174544.png
Screenshot 2021-04-17 174837.png

*Note keyboard and normal firm ware is using the same steps.

1. open your ATMEL Flip then follow click in first picture.

2. select your chip you will know the chip number by devive manager it should say usb something in most case your chip is 16U2.

3.Follow click in second picture.

4.Select USB then select open.

5.Follow click in third picture

6.select your firmware

7.Click run

8.Once run complete click start aplication

9.Once it said comunication off in bottom right replug-in your arduino

Conect PS2 Keyboard

1329677183.or.24457.png

PS2 key board leyout are shown as first picture

gnd = red

vcc = yellow

data = green

clk = orange

conect gnd to your arduino gnd

conect vcc to your arduino 5v vcc

conect data to your arduino digitalpin 8

conect clk to your arduino digitalpin 3

Key Lay-out for Marcro

*Note all key are locate on num pads and all keys except - and + are toggle key.3

num0: Press ctrl+v then hit enter

numdel(.):Press . on num pad then hit enter

num-:Press ctrl+c

num+:Press ctrl+v

****from this will be use for spam in gtav and will hit t first and end by hit enter*****

num1:spam "."

num2:spam"cnm"

num3:spam"bruh"

num4:Press t then press ctrl+v then press enter

*****Feel free to give me a feed back or comment or improvement that should be done I appreciate it alll*******