Cov txheej txheem:
- Kauj ruam 1: Cov ntaub ntawv
- Kauj Ruam 2: Txuas RTC
- Kauj Ruam 3: Teem Sijhawm
- Kauj Ruam 4: Txuas lub LCD
- Kauj Ruam 5: Teeb LCD
- Kauj Ruam 6: Txuas Buzzer
- Kauj Ruam 7: Nruab Tswb
- Kauj Ruam 8: Ua Daim Npog Tiv Thaiv
- Kauj Ruam 9: Siv Koj Lub Tswb
Video: Alarmclock: 9 Kauj ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Qhov no yog qhia rau lub tswb moos. Peb tau ua lub tswb moos vim peb ib txwm tuaj lig lossis peb feem ntau hnov qab teeb tsa lub tswb.
Lub tswb moos no tsis siv neeg tag nrho, yog li koj tsis tas yuav teeb tsa koj lub tswb. Koj tuaj yeem xaiv lub sijhawm sawv sib txawv rau txhua hnub. Koj yuav tsum teeb tsa lub sijhawm sawv ntxov ib zaug, thiab tom qab ntawd koj lub tswb nrov ntawm lub sijhawm xaiv.
Kauj ruam 1: Cov ntaub ntawv
1. Arduino
Peb siv Arduino Uno. Koj tuaj yeem txuas Arduino rau lub khoos phis tawj nrog USB-cable. Txhawm rau program Arduino, koj xav tau Arduino Sketch program hauv koj lub computer.
2. Lub Sijhawm Tiag
Lub Sijhawm Tiag, lub npe RTC, yog lub computer-moos. RTC hloov kho lub sijhawm, yog li koj yuav tsum teem sijhawm ib zaug. Peb siv RTC ZS-042
3. Ua kua Crystal Display
Cov kua siv lead ua kua, npe hu ua LCD, yog lub vijtsam uas koj tuaj yeem txuas rau arduino.
4. Cov qhob cij
Txhawm rau ua hluav taws xob hluav taws xob, nws yog qhov muaj txiaj ntsig zoo kom muaj lub khob cij. Arduino tswj hwm txhua tus pin.
5. Poj niam thiab txiv neej cov xov hlau
Txhawm rau txuas cov khoom siv hluav taws xob, koj tuaj yeem siv cov xov hlau no. Koj tuaj yeem txuas tus txiv neej thiab poj niam cov xov hlau nrog lub qhov thiab tus pin.
6. Buzzer
Lub suab nrov ua rau lub suab rau koj lub tswb.
7. USB-cable
Koj tuaj yeem txuas Arduino mus rau lub khoos phis tawj nrog USB-cable, yog li koj tuaj yeem tsim kho Arduino.
8. 9 volt roj teeb
9. Roj teeb clip
Txhawm rau txuas cov arduino nrog 9 volt batty, koj xav tau daim vis dis aus no.
10. Lego
Peb tau ua peb daim npog tiv thaiv nrog lego, tab sis koj tuaj yeem xaiv lwm yam yog tias koj xav tau.
Kauj Ruam 2: Txuas RTC
Txhawm rau txuas RTC rau arduino, peb xav tau RTC, Arduino, Breadboard, poj niam thiab txiv neej cov xov hlau.
Kev sib txuas Arduino
-GND: muab tso rau ntawm txoj hauj lwm j12 ntawm lub khob cij
-8: Muab tso rau ntawm txoj hauj lwm j10 ntawm lub khob cij
Kev Txuas RTC:
- 32K: tso ntawm A5 hauv Arduino
-SQW: qhov chaw ntawm Vin hauv Arduino
- SCL: Muab tso rau ntawm txoj hauj lwm h30 ntawm lub khob cij
- SDA: Muab tso rau ntawm txoj hauj lwm g30 ntawm lub khob cij
-VCC: tsis txhob tso qhov no
-GND: tso rau ntawm GND hauv Arduino
Kauj Ruam 3: Teem Sijhawm
Ua ntej, koj yuav tsum piav qhia RTC hauv daim duab:
#suav nrog
DS3231 rtc (SDA, SCL);
Tam sim no, koj tuaj yeem teem sijhawm:
rtc.begin ();
rtc.setDOW (Friday); // Teeb Hnub-ntawm-Lub Limtiam rau SUNDAY
rtc.setTime (15, 49, 0); // Teem sijhawm rau 12:00:00 (24 teev hom ntawv)
rtc.setDate (13, 4, 2018);
Koj tuaj yeem tshawb xyuas koj lub sijhawm ntawm tus saib xyuas.
Kauj Ruam 4: Txuas lub LCD
Tam sim no koj yuav tsum txuas lub LCD mus rau Arduino. Peb txuas 4 cov xov hlau los ntawm LCD mus rau Arduino lossis lub khob cij. Koj yuav tsum txuas cov xov hlau zoo li no:
- GND: tso rau ntawm GND rau hauv arduino
- VCC: muab tso rau hauv lub hwj chim ntawm daim txiag ntoo
- SDA: muab tso rau ntawm txoj haujlwm j29 ntawm daim ntawv qhia zaub mov
- SCL: tso rau ntawm txoj hauj lwm f30 ntawm lub khob cij
Kauj Ruam 5: Teeb LCD
Koj yuav tsum piav qhia LCD hauv daim duab. Koj yuav tsum ua li no:
#suav nrog
Hauv ntu no ntawm txoj cai tau piav qhia tias LCD yuav qhia hnub thiab sijhawm ntawm lub vijtsam.
void teeb tsa ()
{lcd.begin (16, 2); rau (int i = 0; i <5; i ++) {lcd.noBacklight (); ncua (500); lcd.backlight (); lcd.print ("Tswb ceeb"); ncua (500); lcd.clear (); }
Kauj Ruam 6: Txuas Buzzer
Lub tswb nrov tau muab tso rau ntawm tus pin h10 thiab hauv tus pin h12 ntawm lub khob cij. Lub suab yog qhia los ntawm lo lus 'tone'. Hauv peb daim duab peb tau xaiv lub suab no rau lub tswb nrov: suab nrov (10, 440, 200).
Kauj Ruam 7: Nruab Tswb
Peb tau xaiv los ua lub tswb tsis siv neeg. Peb tau teeb tsa lub tswb moos txij hnub Monday txog Saturday. Peb feem ntau muaj teeb meem uas peb tsis nco qab teeb tsa peb lub tswb moos, qhov no yog kev daws teeb meem rau peb. Peb tau hloov lub tswb ntawm peb lub tsev kawm ntawv lub sijhawm. Yog tias lub tswb ceeb toom muaj lub suab nrov thiab lub vijtsam flashes. Nov yog cov cai rau lub tswb ceeb toom hauv de void loop:
tswb ceeb toom (); yog (t.min == 15 && t.hour == 7) {lcd.noBacklight (); ncua (5000); lcd.backlight (); suab nrov (10, 440, 200); }}
void alarmcheck () {if (t.min == 15 && t.hour == 7 && rtc.getDOWStr (FORMAT_LONG) == "Monday") {tswb (); } yog (t.min == 45 && t.hour == 9 && rtc.getDOWStr (FORMAT_LONG) == "Tuesday") {tswb (); } yog (t.min == 14 && t.hour == 13 && rtc.getDOWStr (FORMAT_LONG) == "Wednesday") {tswb (); } yog (t.min == 45 && t.hour == 7 && rtc.getDOWStr (FORMAT_LONG) == "Thursday") {tswb (); } yog (t.min == 45 && t.hour == 7 && rtc.getDOWStr (FORMAT_LONG) == "Friday") {tswb (); } yog (t.min == 15 && t.hour == 9 && rtc.getDOWStr (FORMAT_LONG) == "Saturday") {tswb (); }}
tsis muaj lub tswb nrov () {lcd.noBacklight (); ncua (1000); lcd.backlight (); rau (int kuv = 0; kuv <100; kuv ++) {suab (10, 200*kuv+200); }}
Thaum tsis muaj lub tswb koj tuaj yeem pom lub sijhawm thiab hnub tim ntawm cov zaub. Nov yog qhov chaws:
t = rtc.getTime (); Serial.println (rtc.getDOWStr (FORMAT_LONG)); lcd.setCursor (0, 0); lcd.print ("Sijhawm:"); lcd.print (rtc.getTimeStr ()); lcd.setCursor (0, 1); lcd.print ("Hnub tim:"); lcd.print (rtc.getDateStr ()); ncua (1000); lcd.clear ();
Kauj Ruam 8: Ua Daim Npog Tiv Thaiv
Tag nrho cov khoom siv hluav taws xob tau txuas nrog tam sim no. Ib yam uas peb xav tau yog lub hau npog. Peb tau ua daim npog tiv thaiv los ntawm Lego, tab sis koj tuaj yeem xaiv yam koj xav tau.
Kauj Ruam 9: Siv Koj Lub Tswb
Tam sim no, lub tswb ceeb toom tau npaj siv. Koj yuav tsis tuaj lig, vim yog lub tswb moos tsis siv neeg no!
Pom zoo:
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom - Cov Kauj Ruam ntawm Kauj Ruam: 4 Kauj Ruam
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom | Cov kauj ruam ib kauj ruam: Hauv txoj haujlwm no, kuv yuav tsim qhov yooj yim Arduino Tsheb Rov Qab Tsheb Nres Tsheb Nres Sensor Siv Arduino UNO thiab HC-SR04 Ultrasonic Sensor. Qhov no Arduino raws Lub Tsheb Rov Qab ceeb toom tuaj yeem siv rau Kev Tshawb Fawb Txog Tus Kheej, Robot Ranging thiab lwm yam
Tsev Automation Kauj Ruam ntawm Kauj Ruam Siv Wemos D1 Mini Nrog PCB Tsim: 4 Kauj Ruam
Tsev Automation Kauj Ruam Ib Leeg Siv Wemos D1 Mini Nrog PCB Tsim: Tsev Automation Kauj Ruam los ntawm Kauj Ruam siv Wemos D1 Mini nrog PCB Tsim cov tub ntxhais kawm ntawv qib siab. Tom qab ntawd ib tus ntawm peb cov tswv cuab tuaj
RC Taug Qab Neeg Hlau Siv Arduino - Kauj Ruam Ib kauj ruam: 3 Kauj Ruam
RC Tracked Robot Siv Arduino - Kauj Ruam Ib Nrab: Hav guys, Kuv rov qab los nrog lwm tus neeg hlau txias chassis los ntawm BangGood. Vam tias koj tau dhau los ntawm peb cov phiaj xwm yav dhau los - Spinel Crux V1 - Tus Cwj Pwm Tswj Tus Neeg Hlau, Spinel Crux L2 - Arduino Xaiv thiab Muab Neeg Hlau nrog Robotic caj npab thiab Badland Braw
Kawm Yuav Ua Li Cas Kos Tus Tswm Ciab - Kauj Ruam Ib Kauj Ruam: 6 Kauj Ruam
Kawm Yuav Ua Li Cas Thiaj Li Tswmciab - Kauj Ruam Ib kauj ruam: Cov tswm ciab no siv sijhawm 10 feeb los kos yog tias koj ua raws kuv cov kauj ruam ua tib zoo
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas