Cov txheej txheem:

Arduino Stream Lawj: 5 Kauj Ruam
Arduino Stream Lawj: 5 Kauj Ruam

Video: Arduino Stream Lawj: 5 Kauj Ruam

Video: Arduino Stream Lawj: 5 Kauj Ruam
Video: Logic Gates Learning Kit #2 - Transistor Demo 2024, Hlis ntuj nqeg
Anonim
Arduino Stream Lawj
Arduino Stream Lawj
Arduino Stream Lawj
Arduino Stream Lawj
Arduino Stream Lawj
Arduino Stream Lawj

Kuv pom ib yam dab tsi los ntawm kuv qhov kev mus rau Asmeskas uas kuv xav tias yog qhov txias heev thiab muaj txiaj ntsig - Cov Dej Kwj Dej. Nws yog qhov pib yooj yim yuam sij rau txhua yam app koj xav tau, zoo rau kev ua haujlwm ntau. Tab sis qhov khoom yog nws kim dhau rau kuv (100 $) thiab nws tseem tsis muaj nyob hauv kuv lub tebchaws. Tseem, Kuv xav tias nws yuav muaj txiaj ntsig zoo rau kuv txoj haujlwm, yog li kuv txiav txim siab ua ib tus kheej (uas raug nqi yuav luag 10 $ txij li Suav Suav Pro Pro pheej yig) thiab qhia nws kom cov tub ntxhais kawm thiab tib neeg ntawm pob peev nyiaj tuaj yeem muaj thiab ua rau lawv lub neej yooj yim dua.

Nws tsis yog txawm li cas los xij txawm tias zoo li zoo li 100 $ ib qho tab sis nws ua haujlwm zoo xwb.

(Daim duab ntawm kuv Deck tau ploj lawm Arduino Pro Micro txij li thaum kuv poob thiab tsoo nws, HC - 05 thiab Arduino Pro Mini yog rau lwm qhov haujlwm yog li tsis txhob mloog nws).

Khoom siv

Arduino Pro Micro x 1

Khawm x 12 (Arduino Pro Micro tuaj yeem txhawb nqa 12 khawm max)

PCB loj uas yuav haum rau koj nyiam cov lej ntawm cov nyees khawm

10 k Ohm resistors

Kauj ruam 1: Cov Nyees khawm

Cov Khawm
Cov Khawm
Cov Khawm
Cov Khawm
Cov Khawm
Cov Khawm

Txhawm rau kom Arduino lees paub thaum lub pob raug thawb, peb yuav tsum tau xaim cov khawm xws li:

Khawm tus pin 1 -> 10k resistor -> GND

Khawm tus pin 2 -> VCC

Khawm tus pin 4 -> Ib qho ntawm Digital Pins lossis Analog Pins ntawm Arduino

Rov ua dua kom txog thaum koj tau txais cov lej koj xav tau ntawm cov nyees khawm

Kuv tus PCB yog ruam ruam li ntawd nws nyuaj rau taug qab thaum muaj qhov ua yuam kev tshwm sim, koj yuav xav kom nws muaj ntau lub koom haum rau kev daws teeb meem yooj yim dua.

Kauj ruam 2: Programming Arduino

Kev ua haujlwm nrog Pro Micro yog qhov txawv me ntsis ntawm lwm Arduinos thiab yuav xav tau qee cov kauj ruam ntxiv. Kuv yuav qhia cov lus qhia uas tau pab kuv ua haujlwm rau Pro Micro:

Sparkfun tus nom qhia:

www.sparkfun.com/products/12640

Ib Daim Ntawv Qhia Qhia:

www.instructables.com/id/Set-up-and-Instal…

Tom qab koj ua tiav txuas koj li Pro MIcro rau koj lub PC thiab tam sim no tuaj yeem ua haujlwm rau nws, ntawm no yog tus lej rau kuv Txoj Haujlwm:

#define KEY_RIGHT_SHIFT 0x85 #txhais KEY_RIGHT_ALT 0x86 #define KEY_RIGHT_GUI 0x87

#define KEY_UP_ARROW 0xDA

#define KEY_DOWN_ARROW 0xD9 #define KEY_LEFT_ARROW 0xD8 #define KEY_RIGHT_ARROW 0xD7 #define KEY_BACKSPACE 0xB2 #define KEY_TAB 0xB3 #define KEY_RETURN 0xB0 #define KEY_ESC 0xB1 #define KEY_INSERT 0xD1 #define KEY_DELETE 0xD4 #define KEY_PAGE_UP 0xD3 #define KEY_PAGE_DOWN 0xD6 #define KEY_HOME 0xD2 #define KEY_END 0xD5 #define KEY_CAPS_LOCK 0xC1 #define KEY_F1 0xC2 #define KEY_F2 0xC3 #define KEY_F3 0xC4 #define KEY_F4 0xC5 #define KEY_F5 0xC6 #define KEY_F6 0xC7 #define KEY_F7 0xC8 #define KEY_F8 0xC9 #define KEY_F9 0xCA #define KEY_F10 0xCB #define KEY_F11 0xCC #define KEY_F12 0xCD #define KEY_LEFT_CTRL 0x80 int buttonPin = 9; int buttonPin1 = 10; int buttonPin2 = 8; int buttonPin3 = 6; int buttonPin4 = 5;

#suav nrog

void teeb tsa ()

{pinMode (buttonPin, INPUT); pinMode (buttonPin1, INPUT); pinMode (buttonPin2, INPUT); pinMode (buttonPin3, INPUT); pinMode (buttonPin4, INPUT);

}

void lub voj ()

{yog (digitalRead (buttonPin) == 1) // Thaum khawm 1 raug nias {Keyboard.print ("Luam tawm kab lus koj xav tau"); //

ncua (1000);

} yog (digitalRead (buttonPin1) == 1) {Keyboard.print (""); // Xijpeem kab lus koj xav tau yog tias (digitalRead (buttonPin2) == 1) // Nov yog qhov luv rau hloov kuv cov keyboard cov lus {Keyboard.press (KEY_RIGHT_SHIFT); Keyboard.press (KEY_LEFT_CTRL); Keyboard.release (KEY_LEFT_CTRL); Keyboard.release (KEY_RIGHT_SHIFT); ncua (1000); } yog (digitalRead (buttonPin3) == 1) // Qhib App nrog shortcut Ctrl + Alt + t {Keyboard.press (KEY_LEFT_ALT); Keyboard.press (KEY_LEFT_CTRL); Keyboard.print ('t'); Keyboard.release (KEY_LEFT_ALT); Keyboard.release (KEY_LEFT_CTRL); ncua (1000); } yog (digitalRead (buttonPin4) == 1) // Qhib App nrog luv Ctrl + Alt + p

{Keyboard.press (KEY_LEFT_ALT); Keyboard.press (KEY_LEFT_CTRL); Keyboard.print ('p'); Keyboard.release (KEY_LEFT_ALT); Keyboard.release (KEY_LEFT_CTRL); ncua (1000); }}

Yog tias koj xav kom koj cov keyboard nias "Enter" qhov tseem ceeb: Keyboard.write (10); (ACSII code rau Enter tus yuam sij yog 10)

Qhov qeeb tom qab txhua qhov kev ua yog txhawm rau tiv thaiv tus yuam sij los ntawm spammed.

Nov yog tus lej rau rub tawm:

Kauj ruam 3: Tsim Shortcuts Keys rau Apps

Tsim Shortcuts Keys rau Apps
Tsim Shortcuts Keys rau Apps
Tsim Shortcuts Keys rau Apps
Tsim Shortcuts Keys rau Apps
Tsim Shortcuts Keys rau Apps
Tsim Shortcuts Keys rau Apps

Kauj ruam 1: Tsim kev luv luv rau Cov Apps koj xav siv

Kauj ruam 2: Txoj cai nyem thiab xaiv "Properties"

Kauj ruam 3: Nyem rau ntawm "Shortcut" (pom ntawm daim duab) thiab xaiv tus yuam sij uas koj xav tau

Piv txwv li yog tias koj xaiv "p" qhov luv rau App yuav yog Ctrl + Alt + p

Tam sim no koj yuav tsum zoo mus

// Koj tuaj yeem pom hauv cov cai

yog (digitalRead (buttonPin4) == 1) // Qhib App nrog shortcut Ctrl + Alt + p

{

Keyboard.press (KEY_LEFT_ALT); Keyboard.press (KEY_LEFT_CTRL); Keyboard.print ('p'); Keyboard.release (KEY_LEFT_ALT); Keyboard.release (KEY_LEFT_CTRL); ncua (1000); }

Kauj Ruam 4: Cov lus pom zoo

Tswv yim
Tswv yim
Tswv yim
Tswv yim

Kuv tau txais txhua 12 tus yuam sij ntawm Arduino Pro Micro khi rau qee yam, ntawm no yog qhov koj tuaj yeem ua tau:

- Cov lus txib lossis Spams (CS: GO, TF2)

- Universal Hotkeys rau Windows Media Player txij li kuv cov keyboard tsis muaj Media Key Keys

Nov yog phau ntawv qhia rau lub plugin:

www.howtogeek.com/howto/19356/add-global-h…

Txuas Txuas:

wmpkeys.sourceforge.net/

- Pib sau tus lej zais: Yog tias koj tsis xav kom nco tus password ntawm koj tus browser, khi nws rau ib qho ntawm cov nyees khawm (nws muaj kev pheej hmoo tab sis yog tias koj tsis sau cov yuam sij nws yuav tsum zoo, siv:

yog (digitalRead (buttonPin) == 1) // Thaum khawm 1 raug nias {Keyboard.print ("Password");

ncua (1000);

Keyboard.write (10); // Txhawm rau nias Enter

}

Kauj ruam 5: Kev nthuav dav

Kev nthuav dav
Kev nthuav dav

Koj tuaj yeem sim thiab ntxiv cov ntsuas thiab ntsuas rau Pro Micro kom muaj ntau txoj hauv kev los qhib koj lub PC.

Tej zaum tus nyeem ntawv RFID, tus nyeem IR yog li thaum koj luam theej duab daim npav, lossis nias koj lub chaw taws teeb, Pro mini tuaj yeem luam tus password.

Piv txwv li, koj khau raj koj lub PC, tsis txhob ntaus koj tus password, koj luam theej tawm RFID qhov tseem ceeb thiab PC tau qhib.

Kuv tau xav txog qhov no ib ntus tab sis tsis tau ua nws txij li thaum kuv tus PCB tsis nyob hauv chav rau lub tshuab luam ntawv, tab sis kuv vam tias koj hais mav tuaj yeem ua rau nws muaj tiag.

Pom zoo: