Cov txheej txheem:
- Kauj Ruam 1: Sib Sau Cov Khoom
- Kauj Ruam 2: Sib dhos Circuit
- Kauj Ruam 3: Teeb LCD Zaub & Clock
- Kauj ruam 4: Coding
- Kauj Ruam 5: Sijhawm Kuaj
- Kauj Ruam 6: Bluetooth App teeb tsa
- Kauj Ruam 7: Tsim Rooj Plaub
- Kauj ruam 8: Ua tiav
Video: Tswb Tswb Tswb Nrog LCD Zaub thiab Bluetooth App: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Lub caij ntuj no tuaj yeem tu siab. Koj sawv, tsaus ntuj thiab koj yuav tsum tau tawm ntawm txaj. Qhov kawg uas koj xav hnov yog lub suab tsis txaus ntseeg ntawm koj lub tswb. Yog tias koj, zoo li kuv, muaj teeb meem sawv thaum sawv ntxov lub tswb moos no tsuas yog qhov koj xav tau.
Hauv qhov kev qhia no, peb tab tom tsim Tshav Tswb Tswb Tswb. Nws yog lub tswb zoo ib yam li lwm qhov uas koj tuaj yeem teev teev thiab feeb uas koj xav kom sawv, tab sis nrog cov txiaj ntsig ntawm kev siv lub teeb kom ci rau koj chav pw ib ntus ntawm lub sijhawm zoo li lub hnub tuaj sawv koj es tsis txhob cuam tshuam zoj!
Peb tseem yuav siv lub bluetooth module los tsim ib qho app uas cia koj teeb tsa lub tswb ntawm koj lub xov tooj mus rau lub moos. Cov zaub LCD yuav qhia lub sijhawm, hnub thiab hnub ntawm lub asthiv. Lub hnub ci teeb muaj nyob ntawm kev ua lag luam tab sis lawv tuaj yeem kim (tshawb nrawm hauv Google rov qab cov khoom hauv range 100 ntau yam), tsis yooj yim thiab kho tau zoo heev. Tias yog vim li cas kuv thiaj txiav txim siab los ua kuv tus kheej rau kuv li Arduino School Project. Txhua ntu yuav raug teev nyob rau qib tom ntej. Cov cai tuaj yeem rub tawm los ntawm kuv Github repo hnub tuaj-tswb-moos. Cia peb pib:)
txhua tus lej tuaj yeem pom ntawm:
Kauj Ruam 1: Sib Sau Cov Khoom
Peb yuav siv lub moos raws li peb cov tswv yim thiab lub teeb ci ci ci tshaj plaws raws li peb cov zis los ua piv txwv peb hnub tuaj.
Txhawm rau tsim lub Circuit Court peb yuav xav tau:
- Arduino Uno -clockmodule RTC DS3231 - MOSFET los tswj qhov ci ntawm lub teeb - lub teeb ci ci tshaj plaws (Kuv yuav 2, ib qho sov, ib qho txias) - 9V roj teeb kom muaj zog rau LED - lub khob cij - lub LCD zaub (16: 2)- Bluetooth adapter hc-05 yog li peb tuaj yeem siv app los teeb tsa lub tswb.
Txhua yam koj xav tau tuaj yeem yuav ntawm www.martoparts.nl
Kauj Ruam 2: Sib dhos Circuit
Koj tuaj yeem xa mus rau cov duab kos rau kuv lub voj voog, hmoov tsis zoo Kuv tsis pom RTC DS3231 hauv qhov haujlwm yog li kuv yuav tsum ua qhov no. Kev sib txuas sib txawv me ntsis ntawm qhov tseeb, ntawm no yog kev sib txuas. (bluetooth module tsis nyob hauv daim duab tab sis kuv yuav piav qhia nws ua haujlwm li cas hauv qab no ua rau nws tsis yooj yim)
RTC DS3231GND mus rau GND ntawm arduino
VCC mus rau 5v
SDA mus rau arduino
SCL mus rau arduinoWe yuav tsis siv SQW & 32KMOSFET
Lub rooj vag tus pin mus rau tus pin ~ 9 ntawm Arduino Uno vim tias nws yog PWMDrain tus pin mus rau qhov tsis zoo ntawm LED Source tus pin mus rau GND ntawm ArduinoLCD-DisplayGND mus rau GND ntawm arduino
VCC mus rau 5VSDA mus rau A4 ntawm arduinoSKL mus rau A5 ntawm arduinoLED- mus rau mosfet+ mus rau 5v9v roj teeb Koj tuaj yeem yuav roj teeb 9v hauv ib lub khw hauv zos, ntsaws rau hauv arduino nrog txuas txuas.
Bluetooth module hc-055V mus rau 5V los ntawm arduino
GND mus rau GND ntawm arduino
Tam sim no muaj 2 qhov kev tawm tswv yim ntxiv tab sis ntawm no yog qhov ua kom yuam kev, peb yuav tsum txuas cov lus sib txawv ntawm cov 2 ntawm arduinoTX los ntawm hc-05 mus rau RX ntawm arduinoRX los ntawm hc-05 mus rau TX ntawm arduino
Tseem ceeb: Nco ntsoov tias koj DISCONNECT TX & RX los ntawm HC-05 thaum koj tab tom tso cov lej ntawm koj li arduino lossis koj yuav tau txais ib qho yuam kev hais tias "muaj qee yam tsis raug nrog uploading cov cai" hauv tus sau.
Kauj Ruam 3: Teeb LCD Zaub & Clock
Lub tsev qiv ntawv siv rau LCD zaub yog cov kua ua kua thiab tuaj yeem nrhiav tau ntawm: https://github.com/fdebrabander/Arduino-LiquidCrys… Rub cov ntawv zip, khaws nws thiab muab tso rau hauv koj li Arduino's/libraries folder
Lub tsev qiv ntawv uas kuv siv los khiav lub moos tuaj yeem nrhiav tau ntawm Rinky-Dinky Electronics https://www.rinkydinkelectronics.com/library.php?id=73 thiab xyuas kom tseeb tias koj nyob ntawm DS3231 nplooj ntawv. Rub tawm cov ntawv zip, khaws nws thiab muab tso rau hauv koj li Arduino lub tsev qiv ntawv cov ntawv tais ceev tseg.
Sijhawm
Suav nrog lub tsev qiv ntawv DS3231 lossis DS1307 hauv koj tus lej arduino
Tsis suav nrog 3 kab ntawm txoj cai los teev sijhawm:
// rtc.setDOW (MONDAY); // Teeb Hnub-ntawm-Lub Limtiam rau SUNDAY // rtc.setTime (23, 57, 0); // Teem sijhawm rau 12:00:00 (24 teev hom ntawv) // rtc.setDate (14, 1, 2019); // Teev hnub tim rau Lub Ib Hlis Tim 1, 2014
Zaub Zaub
Suav nrog lub tsev qiv ntawv liqduicrystal_i2c hauv koj tus lej arduino
Txhawm rau luam tawm ntawm LCD Zaub siv
lcd.setCursor (col, kab) // txoj haujlwm ntawm cov ntawv luam tawm lcd.print (~) // cov ntawv luam tawm
Kauj ruam 4: Coding
Rub tus lej ntawm: github:
Tsis suav nrog 3 kab no los teeb tsa lub moos ntawm koj lub LCD:
// rtc.setDOW (MONDAY); // Teeb Hnub-ntawm-Lub Limtiam rau SUNDAY // rtc.setTime (23, 57, 0); // Teem sijhawm rau 12:00:00 (24 teev hom ntawv) // rtc.setDate (14, 1, 2019); // Teev hnub tim rau Lub Ib Hlis Tim 1, 2014
Siv lcd.setCuros (col, kab); los teeb tsa txoj haujlwm ntawm cov ntawv ntawm cov zaub
lcd.setCursor (0, 2);
thiab luam () luam ib yam dab tsi ntawm cov zaub
lcd.print (rtc.getDateStr ());
Hloov cov kev hloov no yog tias koj xav tau
int fadeTime = 1; // Ntev npaum li cas lub teeb yuav ploj mus rau maxint setHour = 02; // Teev teev kom sawv (sijhawm ua tub rog) int setMin = 49; // Teem feeb kom sawv int uled = 9; // Set pinout with PWM
Bluetooth module code
String firstHalf = getValue (cov tswv yim, ':', 0); // kos thawj cov tswv yim kom txog thaum ":"
Txoj hlua thib obHalf = getValue (input, ':', 1); // txheeb xyuas cov lus qhia thib ob tom qab ":"
// siv cov cai no yog tias koj tsis siv lub bluetooth module
// // yog (t.hour == setHour && t.min == setMin) // Txheeb xyuas seb nws txog lub sijhawm sawv! // {// pib (); //}
// txheeb xyuas thawj 2 tus lej nkag, tom qab ntawv txheeb xyuas ob tus lej thib ob
yog (t.hour == firstHalf.toInt () && t.min == secondHalf.toInt ()) {pib (); }}
// logic los cais cov hlua
Txoj hlua getValue (Cov ntaub ntawv cov hlua, cov ntawv cais cais, int index) {int pom = 0; int strIndex = {0, -1}; int maxIndex = data.length () - 1;
rau (int i = 0; i <= maxIndex && pom <= index; i ++) {if (data.charAt (i) == separator || i == maxIndex) {pom ++; strIndex [0] = strIndex [1] + 1; strIndex [1] = (kuv == maxIndex)? kuv+1: kuv; }} rov pom pom> ntsuas? data.substring (strIndex [0], strIndex [1]): ""; }
Kauj Ruam 5: Sijhawm Kuaj
Sau koj cov cai & ntsuas yog tias cov khoom ua haujlwm!
Kauj Ruam 6: Bluetooth App teeb tsa
Vim tias kuv pom nws nyuaj rau khawb rau hauv cov lej txhua lub sijhawm kuv xav teeb tsa lub tswb Kuv xav ua lub app uas yuav teeb tsa lub tswb, uas yog txoj hauv kev yooj yim dua.
Mus rau https://ai2.appinventor.mit.eduhere peb tuaj yeem ua daim ntawv thov yooj yim uas cia peb teeb tsa lub tswb, Kuv tau suav nrog cov qauv tsim yooj yim teeb tsa (koj tuaj yeem ib txwm tweak qhov no tom qab) thiab cov cai siv rau kev txuas bluetooth. Koj tuaj yeem tshaj tawm koj lub app thiab txuas nrog nws ntawm koj lub xov tooj los ntawm kev siv QR code lossis rub ncaj qha rub tawm lub app ntawm koj lub computer, tom qab ntawd xa nws hla nrog cable ntawm koj lub xov tooj. (screenshot)
Kauj Ruam 7: Tsim Rooj Plaub
Koj tuaj yeem tsim ib rooj plaub sib txawv nyob ib ncig ntawm koj lub moos arduino. Kuv siv ntoo thiab matte plexiglass los tsim kuv tus kheej lub tswb moos. Kuv xaiv matte plexiglass yog li koj tuaj yeem pom lub teeb pom kev ci ntsa iab los ntawm rooj plaub tab sis koj tsis tuaj yeem pom sab hauv ntawm lub moos.
Kauj ruam 8: Ua tiav
Tam sim no koj tau xa cov cai rau koj li arduino, tsim rooj plaub thiab tshawb xyuas yog tias koj tau teeb tsa koj lub moos kom raug, koj tuaj yeem teeb tsa lub tswb ntawm bluetooth app thiab pib sawv ntau dua li ib txwm!:)
Pom zoo:
Tswb Tswb Tswb Tswb Tswb: 3 Kauj Ruam
Lub Tswb Tswb Tswb Tswb: Kuv yog menyuam kawm ntawv 13 xyoos hauv Taiwan.Kuv ua yam nrog Arduino thawj zaug yog tias koj tuaj yeem qhia kuv yuav ua li cas txhim kho txoj haujlwm no, thov tawm lus rau kuv kom kuv tuaj yeem ua qhov zoo dua. (Ua tsaug ) Lub moos no tuaj yeem tsa koj thaum koj tsaug zog, tab sis kuv
Tswb Tswb Tswb Tswb Tswb Ntse Teeb: 8 Kauj Ruam (nrog Duab)
Tswb Tswb Tswb Tswb Tswb Lub Teeb: Hauv qhov haujlwm no kuv tau siv lub tshuab cua-tsoo lub tswb tawg tag. Lub ntsej muag ntawm lub moos tau hloov pauv los ntawm 12 LEDs, teeb pom kev los ntawm LED kab ib ncig ntawm ntug ntawm lub moos. 12 LEDs qhia lub sijhawm thiab cov hlua LED tau teeb tsa los ua lub tswb, tig
Arduino Push Alerts rau Lub Tswb, Tswb Tswb, Tswb Tswb Tswb Thiab Lwm Yam: 8 Kauj Ruam
Arduino Push Alerts rau Tswb, Tswb Tswb, Tswb Tswb Tswb thiab lwm yam: IoT Cov Ntawv Ceeb Toom los ntawm koj lub Tswb, Tswb Tswb, Tswb Tswb thiab lwm yam siv Arduino Uno thiab Ethernet Shield. Cov ncauj lus kom ntxaws ntawm kuv lub vev xaib ntawm no Hais txog Arduino Push Alert Box Siv Arduino Uno thiab Ethernet Shield raws li Wiznet W5100 nti rau
Tsim Lub Tswb Tswb Tswb Tswb Rau Koj Lub PC thiab Hluav Taws Xob Hluav Taws Xob-Clock: 3 Kauj Ruam (nrog Duab)
Tsim Tsa Tswb Tswb Tswb Tswb Rau Koj Lub PC thiab Hluav Taws Hluav Taws Xob-Clock: Lub tswb tooj dag, lub me me txuas ob peb yam ntxiv thiab lub tswb nrov tuaj yeem tsoo lub sijhawm ntawm koj lub khoos phis tawj. OS X kuj, Kuv xav tias yuav nruab Ubuntu Linux ntawm lub PC Kuv pom hauv lub thoob khib nyiab thiab ua haujlwm ntawm qhov ntawd: Kuv tsis tau
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa: 7 Kauj Ruam (nrog Duab)
LED Tswb Tswb Tswb Tswb Tswb Tswb Tsa Tswm Tsa Tswm Tswm: Tsa Kuv Lub Caij Ntuj No Lub caij ntuj no kuv tus hluas nkauj muaj teeb meem sawv thaum sawv ntxov thiab zoo li raug kev txom nyem los ntawm SAD (Lub Caij Caij Nyoog Muaj Teeb Meem). Kuv txawm pom tias nyuaj npaum li cas kom sawv thaum lub caij ntuj no vim lub hnub tsis tuaj