Cov txheej txheem:

Tsis Siv Neeg Page Turner: 6 Kauj Ruam
Tsis Siv Neeg Page Turner: 6 Kauj Ruam

Video: Tsis Siv Neeg Page Turner: 6 Kauj Ruam

Video: Tsis Siv Neeg Page Turner: 6 Kauj Ruam
Video: Tau kev seev vim ruam tsis deev. 9/28/2017 2024, Kaum ib hlis
Anonim
Image
Image
Khoom siv
Khoom siv

Koj puas tau muaj teeb meem ntxeev nplooj ntawv thaum ua lub ntsuas? Kuv paub tseeb tias peb coob leej muaj. Qhov nplooj ntawv tsis siv neeg no tuaj yeem pab koj daws qhov teeb meem. Nws yog super yooj yim los ua haujlwm nrog. Koj yooj yim tso cov khoom rau hauv pem teb thiab txhua yam koj xav tau ua nws kauj ruam ntawm lub pob kom tig nplooj ntawv. Qhov tseem ceeb dua, qhov no yooj yim heev los ua! Yog li tsis muaj ado ntxiv, cia peb pib!

Kauj Ruam 1: Cov khoom siv

Khoom siv
Khoom siv
  • Arduino Leonardo pawg thawj coj saib
  • Cov qhob cij
  • Jumper xov x 8
  • 470 ohm tiv thaiv
  • Khawm
  • Shoebox lub thawv

Kauj Ruam 2: Sib sau Cov Khoom Siv Hluav Taws Xob

Sib sau Electronics
Sib sau Electronics
Sib sau Electronics
Sib sau Electronics
Sib sau Electronics
Sib sau Electronics
  • txuas cov xov hlau rau khawm
  • txuas 5v rau qhov zoo thiab GND rau qhov tsis zoo
  • txuas qhov zoo thiab tsis zoo rau daim ntawv qhia zaub mov
  • txuas GND rau Pin 4 thiab Pin 2 rau ntawm daim ntawv qhia zaub mov
  • txuas lub resistor mus rau lub khob cij
  • txuas lub pob rau daim ntawv qhia zaub mov

Kauj ruam 3: Coding

Coding
Coding

Kauj ruam kawg yog coding. Koj tuaj yeem xaiv los siv ArduBlock (cov duab muab) lossis tus lej version.

Txuas rau cov cai nyob ntawm no

#suav nrog

/* Cov tsev qiv ntawv tseem ceeb no tso cai rau 32u4 thiab SAMD cov laug cam (Leonardo, Esplora, Zero, Due thiab MKR Tsev Neeg) kom tshwm los ua ib tus nas thiab/lossis Keyboard rau lub khoos phis tawj txuas. */ tsis muaj teeb tsa teeb tsa () {// muab koj cov cai teeb tsa ntawm no, kom khiav ib zaug: pinMode (2, INPUT); // teeb tsa tus lej digital ua tswv yim Keyboard.begin (); // initializ e tswj hwm cov keyboard Keyboard.releaseAll (); } void loop () {// muab koj tus lej tseem ceeb ntawm no, kom rov ua dua: yog (digitalRead (2)) {pinMode (4, INPUT_PULLUP); // ua tus pin 4 cov tswv yim thiab qhib lub rub rub tawm kom nws mus siab tshwj tsis yog txuas nrog hauv av yog (digitalRead (4) == LOW) {// tsis ua dab tsi txog thaum tus pin 4 mus qis Keyboard.press (215); // tus yuam sij nias (ASCII code)} Keyboard.releaseAll (); }}

Kauj ruam 4: Lub thawv

Lub Thawv
Lub Thawv
Lub Thawv
Lub Thawv
  1. taug qab qhov loj ntawm lub pob ntawm lub npov
  2. txiav tawm lub qhov

Kauj ruam 5:

Duab
Duab
Duab
Duab
Duab
Duab
  1. Muab lub pob los ntawm lub qhov
  2. Muab Arduino tso rau hauv lub thawv

Kauj ruam 6: Ua kom tiav

Pom zoo: