Cov txheej txheem:

Lub Teeb Pom Lub Teeb: 25 Kauj Ruam (nrog Duab)
Lub Teeb Pom Lub Teeb: 25 Kauj Ruam (nrog Duab)

Video: Lub Teeb Pom Lub Teeb: 25 Kauj Ruam (nrog Duab)

Video: Lub Teeb Pom Lub Teeb: 25 Kauj Ruam (nrog Duab)
Video: Hwm Pheej Thoj - Rov Mus Txog Vib Nais 2024, Hlis ntuj nqeg
Anonim
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb
Programmable Pumpkin Teeb

Cov Lus Qhia no yog ua kom muaj lub teeb taub dag nrog lub ATTiny microcontroller. Qhov no tau tsim los ua kev qhia paub qhia leej twg (hnub nyoog 8+) rau hauv cov khoom siv hluav taws xob thiab kev tswj hwm microcontrollers siv Arduino IDE.

Leaning Lub Hom Phiaj:

  1. Nkag siab tias dab tsi yog Kev Tawm Tswv Yim, thiab Qhov Tawm Tawm yog dab tsi rau lub microcontroller.
  2. Nkag siab tias yuav ua li cas microcontroller Output tuaj yeem tswj hwm LED.
  3. Nkag siab tias yuav ua li cas Cov Khawm Nkag Nkag tuaj yeem nyeem los ntawm microntroller.

Qhov Yuav Tsum Tau:

  1. 1 Mini Bread Board
  2. 1 TSI 85
  3. 13V npib cell roj teeb
  4. 1 npib ntawm tes tuav lub roj teeb
  5. 1330 Ohm resistors (Txiv kab ntxwv, Txiv kab ntxwv, Liab)
  6. 1 10 k Ohm resistor
  7. 1 RGB LED
  8. 1 swb swb
  9. 1 laub khawm
  10. 8 cev
  11. 1 Piezzo Buzzer

Cov Cuab Yeej Xav Tau:

  1. Lub Computer nrog Arduino Software
  2. Tus kws tshaj lij AVR (Peb siv Sparkfuns Tiny AVR Prorgrammer tab sis yog tias koj twb muaj Arduino lawm koj tuaj yeem ua raws cov lus qhia no rau program ATTiny85 nrog koj cov arduino)
  3. Txhawm rau cov cai no ua haujlwm koj yuav tsum siv Dr. Azzy's ATTiny Board pom ntawm no: https://drazzy.com/package_drazzy.com_index.json (Cov lus qhia yuav ua li cas thiaj teeb tsa tau muab rau hauv Kauj Ruam 20)
  4. RTTL lub tsev qiv ntawv pom ntawm no: https://github.com/cefn/non-blocking-rtttl-arduino/blob/master/README.md (Cov lus qhia yuav ua li cas thiaj teeb tsa tau muab rau hauv Kauj Ruam 21)

Kauj Ruam 1: Muab cov Cheebtsam tso rau ntawm koj lub Breadboard

Ob peb kauj ruam tom ntej yuav qhia koj yuav ua li cas xaim koj lub khob cij. Nws yog qhov tseem ceeb uas koj xaim koj lub rooj tsav xwm raws nraim li tau qhia hauv cov duab, txwv tsis pub koj lub taub dag lub teeb yuav tsis ua haujlwm. Thov thov kev pab los ntawm ib tus neeg pab dawb yog tias koj tsis paub meej txog dab tsi.

nco tseg: cov kab lus ua mov ci kab ntawm ob sab ntawm kab nruab nrab tau txuas nrog

Kauj Ruam 2: Muab Lub Laub Khawm rau ntawm koj lub Breadboard

Muab lub laub khawm rau ntawm koj lub khob cij
Muab lub laub khawm rau ntawm koj lub khob cij

Ntxig Lub Laub Khawm rau hauv qhov chaw ncig liab ntawm koj lub rooj noj mov

Kauj Ruam 3: Muab RGB LED tso rau ntawm koj lub Breadboar

Muab lub RGB LED tso rau ntawm koj lub Breadboar
Muab lub RGB LED tso rau ntawm koj lub Breadboar

Muab lub RGB LED tso rau hauv qhov chaw ncig ntawm koj lub rooj noj mov. Nws yog ib qho tseem ceeb kom muab lawv tso rau hauv lub rooj tsav xwm raws nraim li tau qhia ntawm no. Cov ceg ntev yuav tsum mus rau hauv lub qhov 5 los ntawm sab saud.

Kauj Ruam 4: Muab ATTINY85 tso rau ntawm koj lub Breadboard

Muab cov ATTINY85 tso rau ntawm koj lub Breadboard
Muab cov ATTINY85 tso rau ntawm koj lub Breadboard

Muab koj daim ATTINY 85 nyob nruab nrab ntawm kab 8 txog kab 11. Nco ntsoov tias lub me me nyob rau sab laug.

*Ua tib zoo saib kom tsis txhob ua txhaum ob txhais ceg ntawm koj ATTINY85 microcontroller. Koj Tsis txhob thawb lub microcontroller txhua txoj hauv kev vim peb yuav tshem nws mus rau qhov program tom qab.

Kauj Ruam 5: Hlau Xiav LED rau Pin 0 ntawm ATTiny85

Hlau Blue LED rau Pin 0 ntawm ATTiny85
Hlau Blue LED rau Pin 0 ntawm ATTiny85

Ntxiv cov xaim txuas rau Blue LED ceg rau tus pin 0 ntawm ATTiny raws li qhia hauv daim duab

Nco tseg* Cov xim ntawm cov hlau tsis muaj teeb meem, tab sis nws yog qhov muaj txiaj ntsig zoo los siv cov xim sib txawv los ua kom yooj yim pom dab tsi txuas nrog.

Kauj Ruam 6: Hlau Ntsuab LED rau Pin 1 ntawm ATTiny85

Hlau Green LED rau Pin 1 ntawm ATTiny85
Hlau Green LED rau Pin 1 ntawm ATTiny85

Hlau tus pin raws li qhia hauv daim duab

Kauj Ruam 7: Hlau Liab LED rau Pin 2 ntawm ATTiny85

Hlau Red LED rau Pin 2 ntawm ATTiny85
Hlau Red LED rau Pin 2 ntawm ATTiny85

Muab xaim rau hauv lub qhov uas qhia hauv daim duab.

Nco tseg* Cov xim ntawm cov hlau tsis muaj teeb meem, tab sis nws yog qhov muaj txiaj ntsig zoo los siv cov khoom sib dhos sib txawv kom yooj yim pom dab tsi txuas nrog.

Kauj Ruam 8: Hlau Sab Lub Hwj Huam ntawm Khawm

Xaim Lub Hwj Huam Sab Ntawm Khawm
Xaim Lub Hwj Huam Sab Ntawm Khawm

Ntxiv qhov ntev (0.75in) xaim dub raws li qhia hauv daim duab

Kauj Ruam 9: Hlau Kab Hauv Qab ntawm RGB LED

Hlau Cov Hauv Paus Ceg ntawm RGB LED
Hlau Cov Hauv Paus Ceg ntawm RGB LED

Ntxiv 330 ohm resistor (txiv kab ntxwv-txiv kab ntxwv-xim av-kub) raws li qhia hauv daim duab.

Kauj Ruam 10: Hlau Fais Fab ntawm ATTiny

Hlau Hwj chim ntawm ATTiny
Hlau Hwj chim ntawm ATTiny

Kauj Ruam 11: Ntxiv Qhov Swb Hloov mus rau Bread Board

Ntxiv qhov Swb Hloov mus rau Lub Rooj Mov Mov
Ntxiv qhov Swb Hloov mus rau Lub Rooj Mov Mov

Ntxiv qhov zawv zawg hloov raws li qhia hauv daim duab.

Kauj Ruam 12: Muab 3V Npib Cell Roj Teeb rau hauv Lub Roj Teeb

Muab lub 3V Npib Cell Roj Teeb rau hauv Lub Roj Teeb
Muab lub 3V Npib Cell Roj Teeb rau hauv Lub Roj Teeb

Ua qhov no ua ntej tso lub Npib Xov Tooj Cell Roj teeb rau hauv lub khob cij.

Kauj Ruam 13: Ntxiv Cov Npib Cell Roj Teeb rau Pawg Mov Ci

Ntxiv Coin Cell Batter rau Lub Rooj Mov Mov
Ntxiv Coin Cell Batter rau Lub Rooj Mov Mov

Ntxiv qhov no hauv qhov tseeb raws li qhia. Xyuas kom tseeb tias lub davhlau ya nyob twg zoo nyob ntawm sab xis.

Kauj Ruam 14: Hlau swb mus rau +3V

Hlau Slide Swith rau +3V
Hlau Slide Swith rau +3V

Qhov no yooj yim dua yog tias koj khoov cov kab daj hauv ib nrab ua ntej raws li qhia hauv daim duab ntawm sab laug.

Kauj Ruam 15: Hlau (-) Pin ntawm ATTiny rau hauv av

Hlau tus (-) Pin ntawm ATTiny rau hauv av
Hlau tus (-) Pin ntawm ATTiny rau hauv av

Raws li qhia hauv daim duab saum toj no

Kauj Ruam 16: Hlau khawm Tso Tawm rau Koj ATTINY85 (tus pin 3)

Hlau khawm tso zis rau koj ATTINY85 (tus pin 3)
Hlau khawm tso zis rau koj ATTINY85 (tus pin 3)

Qhov no tso cai rau koj ATTINY85 txhawm rau txheeb xyuas thaum koj thawb koj lub pob. Ntxiv cov hlau raws nraim li qhia.

Kauj Ruam 17: Ntxiv 10K Resistor ntawm Khawm thiab Hauv av

Ntxiv 10K Resistor Ntawm Khawm thiab Hauv av
Ntxiv 10K Resistor Ntawm Khawm thiab Hauv av

Ntxiv 10 K ohm resistor (Xim av, Dub, Txiv Kab ntxwv, Kub) ntawm hauv av thiab khawm. Qhov no yog rub tawm resistor. Thaum lub pob nyem ATTINY85 nyeem HIGH (+3V), thaum nws tsis nias ATTINY85 nyeem LOW (0 V)

Kauj Ruam 18: Ntxiv Buzzer rau Pawg Cij

Ntxiv Buzzer rau Pawg Cij
Ntxiv Buzzer rau Pawg Cij

Ntxiv lub buzzer rau koj lub rooj noj mov. Nco ntsoov ntxiv nws raws nraim li qhia nrog (+) saum toj.

Kauj Ruam 19: Tsim Koj Li CODE

  1. Download tau cov cai
  2. Kho qhov chaws

Nov yog STATE cov cai tsav. Lub ntsiab lus tias STATE (uas tau ntaus hauv CAPS hauv tus lej piv txwv RED_STATE).

Txhawm rau ntxiv ib lub xeev koj yuav tsum tshaj tawm nws nyob rau sab saum toj ntawm txoj cai, thiab hloov kho tus lej ntawm lub xeev.

Tom qab ntawd koj tuaj yeem hloov kho Hloov cov ntaub ntawv kom suav nrog koj lub Xeev tshiab.

Kauj Ruam 20: Ntxiv Dr. Azzy's Board

Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board
Ntxiv Dr. Azzy's Board

Ntxiv Dr. Azzy Pawg Thawj Coj rau hauv koj Arduino IDE:

  1. Hauv Cov Ntawv Qhia mus rau qhov nyiam
  2. preferances> Chaw nyob hauv cov tswj hwm pawg thawj coj yav dhau los hauv qhov txuas no:
  3. Hauv Cov Cuab Yeej, mus rau Tus Thawj Saib Xyuas Haujlwm
  4. Nruab ATTiny Core los ntawm Spence Konde

Kauj Ruam 21: Ntxiv Rttl Library rau Koj Cov Tsev Qiv Ntawv Arduino

Ntxiv Rttl Library rau Koj Cov Tsev Qiv Ntawv Arduino
Ntxiv Rttl Library rau Koj Cov Tsev Qiv Ntawv Arduino

Txhawm rau kom lub suab nrov ua haujlwm ntxiv cov tsev qiv ntawv ntawm no rau koj Arduino Lub Tsev Qiv Ntawv:

github.com/cefn/non-blocking-rtttl-arduino

Kauj Ruam 22: Kho Arduino IDE rau Program ATTiny

Txhim kho Arduino IDE rau Program ATTiny
Txhim kho Arduino IDE rau Program ATTiny

Nyem cov cuab yeej ntawv qhia zaub mov thiab ua kom ntseeg tau tias Pawg Thawj Coj, Clock, thiab Chip raug

Kauj Ruam 23: Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Tus Kws Tshaj Lij

Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Programer
Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Programer
Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Programer
Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Programer
Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Programer
Program ATTiny thiab Txuas Koj Lub Rooj Mov Caij Nyoog mus rau AVR Programer
  1. Tshem tawm ATTiny los ntawm koj lub rooj noj mov thiab muab tso rau hauv AVR Programmer. Koj yuav tsum ntsaws nws rau hauv lub rooj tsavxwm nrog qhov me me nyob rau ntawm kaum sab saud raws li pom hauv daim duab thawj.
  2. Siv 3 xaim thiab txuas tus pin 2, 1, 0 ntawm tus programmer mus rau tus lej sib xws ntawm koj lub rooj mov ci. Saib cov duab kom paub meej.
  3. Siv ib lub xaim xaim thiab txuas tus pin (-) ntawm tus programmer mus rau hauv av sib xws ntawm koj lub rooj mov ci. Saib cov duab kom paub meej.
  4. thauj tus lej Arduino rau ntawm ATTiny los ntawm kev xaiv tus xub tso rau hauv koj li Arduino IDE (Yog tias koj tau txais qhov yuam kev uas thaum rub tawm cov cai pom cov kauj ruam dhau los)

Kauj ruam 24: Ua tiav

Ua tiav!
Ua tiav!
Ua tiav!
Ua tiav!
Ua tiav!
Ua tiav!

Yog tias koj tus lej ua haujlwm raws li koj xav tau thiab. Tshem cov xov hlau uas hloov pauv tau los ntawm koj cov npua npua thiab tso ATTiny programmer rau hauv koj lub khob cij.

Ua ntej koj teeb koj lub Pumpkin, tso lub voj voog rau hauv lub hnab yas txhawm rau tiv thaiv nws los ntawm kev luv yog tias muaj cov taub taub dag poob rau nws.

Kauj Ruam 25: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Daim duab kos duab Circuit zoo dua tsim los ntawm Kyle Neil tau qhia ntawm no thiab yuav siv Transistor los tswj Buzzer. Yuav tsum tau ua nyob rau yav tom ntej versions

Pom zoo: