Arduino Leonardo Keyboard - Typing and creating macros
HTML-код
- Опубликовано: 20 авг 2024
- An Arduino project to emulate a keyboard. The Arduino acts as a keyboard and sends shortcuts to the computer to control it. In this project we use an Arduino Leonardo or a Pro Micro.
Code and circuit :
techtalkies.in...
Links to buy boards:
techtalkies.in...
Leonardo - amzn.to/3Rmnsr6
Arduino Pro Micro - amzn.to/3GLu7Gq
#include
void setup() {
Keyboard.begin();
pinMode(2, INPUT);
pinMode(3, INPUT);
}
void loop() {
if (digitalRead(2) == HIGH) {
Keyboard.press('A');
delay(0);
}
if (digitalRead(2) == LOW) {
Keyboard.releaseAll();
delay(0);
}
if (digitalRead(3) == HIGH) {
Keyboard.press('B');
Keyboard.releaseAll();
delay(0);
}
if (digitalRead(3) == LOW) {
Keyboard.releaseAll();
delay(0);
}
}
This is so cool 👏
Thank you
Can I use this one to create an autotyping tool for my pc?
Yes!
How to upload Arduino Keyboard .hex file into this Device so that my computer will see this device as a keyboard? Please tell.
You already have a compiled hex file?
@@techtalkies1 Arduino-keyboard-0.3.hex
Downloaded this from a website. Will work to flash Pro Micro repeatedly
@@techtalkies1 ruclips.net/video/tvqA-JcTQNg/видео.html
Can I use his method to flash Pro Micro as well? How can I short the wires?
This video is for the Uno. Different chips
@@techtalkies1 How can I use Pro Micro as HID Keyboard? So that my another PC will detect Pro Micro as a Keyboard only.