Cov txheej txheem:
- Kauj Ruam 1: Kauj Ruam 1: Ua Lub Teeb-lub kaus mom
- Kauj Ruam 2: Kauj Ruam 2: Npaj PVC Ncej
- Kauj Ruam 3: Kauj Ruam 3: Sib dhos RGB LED Sawb thiab Sandblasting Acrylic Plates
- Kauj Ruam 4: Kauj Ruam 4: Txuas RGB LED Sawb rau Arduino
- Kauj Ruam 5: Kauj Ruam 5: Sau Arduino Code
Video: Ntse Sib Tham Sib Teeb Tsheb: 5 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Npaj los tsim lub ntiaj teb qhov zoo tshaj plaws thiab cuam tshuam ntau tshaj plaws kev sib tham sib teeb? Zoo! Hauv qhov kev qhia no, peb yuav piav qhia koj yuav tsim ib qho los ntawm koj tus kheej siv Arduino.
Yam khoom xav tau:- Arduino (..duh)- LM317 Mosfet- 2x 60cm Analog RGB LED Strips (12V)- PVC tube (1m x 125mm)- Cables (liab thiab dub)- Hlau daim hlau rau lub teeb-lub kaus mom-Acryl rau lub teeb -icons (kos flaticon.com rau.svg cov cim)- Spraycan xim dub thiab dawb.- Cov kab xev hluav taws xob- Txhua yam yuav tsum tau siv cov khoom sib txuas- Zaub nrog cov ntaub thaiv npog (tsis siv hauv kev qhia)
Kauj Ruam 1: Kauj Ruam 1: Ua Lub Teeb-lub kaus mom
Tus tsim yog tiag tiag rau koj. Peb tau ua lub hau 15x15cm los tuav lub teeb. Peb tau txiav cov phaj hlau kom raug qhov loj me thiab siv lub raj hlau (tsis yog, tsis yog los ntawm Avatar) khoov lub kaus mom kom haum. Cov thaub qab tau tsim los ntawm cov khoom sib txawv.
Kauj Ruam 2: Kauj Ruam 2: Npaj PVC Ncej
Txiav 2 qhov hauv PVC ncej kom haum rau lub teeb ci. Tom qab ntawd siv cov xim pleev xim dub los pleev xim tag nrho cov dub. Yog tias koj xav tau, koj tuaj yeem ntxiv kab txaij dawb nyob hauv qab ntawm tus ncej (ib txwm nyob hauv Netherlands).
Kauj Ruam 3: Kauj Ruam 3: Sib dhos RGB LED Sawb thiab Sandblasting Acrylic Plates
Tom ntej no koj yuav tsum sib sau ua ke RGB LED strips hauv lub teeb-lub hau. Ua kom lawv nruj nyob ib ncig ntawm lub hau, thiab tso lawv kom ze rau pem hauv ntej li sai tau.
Tom ntej no koj yuav tsum tau zom cov cim uas tau xaiv rau ntawm cov phaj acrylic. Tau txais qee daim kab xev thiab npog tag nrho cov phaj acrylic. Tom qab ntawv txiav tawm cov duab/daim duab uas koj xav tau. Tom qab qhov no, koj tuaj yeem txhuam cov phaj kom tau txais cov dej khov-zoo li iav.
Kauj Ruam 4: Kauj Ruam 4: Txuas RGB LED Sawb rau Arduino
Tam sim no los txog qhov nyuaj: txuas RGB LED Sawb rau Arduino. Thaum koj txuas cov pins kom paub tseeb tias koj muab 12v rau ntawm 12v ntawm koj kab txaij. Nruab nrab ntawm txhua xim, yog li liab lossis ntsuab, koj yuav tsum muab mosfet tso. Txuas cov ntaub ntawv ntawm cov hlua coj mus rau tus pin nruab nrab ntawm mosfet, thiab tus pin sab laug rau koj Arduino. Txoj cai tus pin yuav tsum rov qab mus rau hauv av ntawm Arduino.
Kauj Ruam 5: Kauj Ruam 5: Sau Arduino Code
Txoj cai Arduino no yog tswj los ntawm bluetooth, vim tias peb tsis tau siv cov khoom siv sab hauv. Yog li txoj cai tau tswj hwm los ntawm bluetooth lus hauv lub voj () ua haujlwm.
#define r 6 #txhais g 11 #suav nrog
SoftwareSerial mySerial (10, 11); // RX, TX
#define npau tawsLength 4
#define fallLength 3 #define happyLength 4 #define onPhoneLength 13 #define tham lus ntev 5 #define taug kev Length 4 #define walkingOutLength 4 #define wavingLength 6
khawm khawm;
int tam sim noMillis; int yav dhau losMillis;
int animation1Delay;
int animation2Delay; int animation3Delay; int animation4Delay;
bool animation1Done = tsis tseeb;
bool animation2Done = tsis tseeb; bool animation3Done = tsis tseeb; bool animation4Done = tsis tseeb; bool animation5Done = tsis tseeb;
bool blockLight = tsis tseeb;
bool lightRed = tseeb;
int tam sim noAnimationDelay;
void teeb tsa () {
// muab koj cov cai teeb tsa ntawm no, kom khiav ib zaug: pinMode (r, OUTPUT); pinMode (g, OUTPUT);
Serial.begin (9600);
mySerial.begin (38400); Serial.setTimeout (25); buttonPressed = cuav; currentMillis = 0; PreviousMillis = 0;
animation1Delay = taug kev Length * 1000;
animation2Delay = wavingLength * 1000; animation3Delay = zoo siab ntev * 1000; animation4Delay = taug kev ntev * 1000;
// currentAnimationDelay = animation1Delay * 1000;
lightRed = tseeb; }
void voj () {
// ncua (20);
// tso koj tus lej tseem ceeb ntawm no, kom rov ua dua: tsis tau kos npe ntev tam sim no Millis = millis (); yog (buttonPressed == muaj tseeb) {yog (animation1Done == tsis tseeb) {yog (currentMillis - yav dhau losMillis> animation1Delay) {Serial.println ("0"); PreviousMillis = currentMillis; animation1Done = muaj tseeb; }} lwm yog (animation2Done == tsis tseeb thiab animation1Done == muaj tseeb) {yog (currentMillis - yav dhau losMillis> animation2Delay) {Serial.println ("1"); PreviousMillis = currentMillis; animation2Done = muaj tseeb; }} lwm yog (animation3Done == tsis tseeb thiab animation2Done == muaj tseeb) {yog (currentMillis - yav dhau losMillis> animation3Delay) {Serial.println ("2"); //Serial.println("sound:green "); PreviousMillis = currentMillis; animation3Done = muaj tseeb; lightRed = tsis tseeb; }} lwm yog (animation4Done == tsis tseeb thiab animation3Done == muaj tseeb) {yog (currentMillis - yav dhau losMillis> animation4Delay) {yav dhau losMillis = currentMillis; animation4Done = muaj tseeb; Serial.println ("FLSH"); }}}
yog (Serial.available ()) {
Txoj hlua str = Serial.readString (); yog (str == "CMD: BUTTON_PRESSED") {
animation1Done = tsis tseeb;
animation2Done = tsis tseeb; animation3Done = tsis tseeb; animation4Done = tsis tseeb; animation5Done = tsis tseeb;
animation1Delay = taug kev Length * 1000;
animation2Delay = wavingLength * 1000; animation3Delay = zoo siab ntev * 1000; animation4Delay = taug kev ntev * 1000;
// currentAnimationDelay = animation1Delay * 1000;
lightRed = tseeb; Serial.println ("3"); buttonPressed = tseeb; PreviousMillis = currentMillis; }
yog (str == "RED") {
blockLight = tsis tseeb; lightRed = tseeb; }
yog tias (str == "GREEN") {
blockLight = tsis tseeb; lightRed = tsis tseeb; }
yog tias (str == "LIGHT: GREEN: OFF") {
blockLight = tseeb; analogWrite (g, 255); } yog (str == "LIGHT: GREEN: ON") {blockLight = tseeb; analogWrite (g, 0); } //Serial.println(str); }
yog tias (blockLight == tsis tseeb) {
yog (lightRed == muaj tseeb) {
analogWrite (r, 0); analogWrite (g, 255); } yog (lightRed == tsis tseeb) {analogWrite (r, 255); analogWrite (g, 0); }}}
Pom zoo:
BBC Micro: me ntsis thiab kos - Sib tham sib Steering Log & Tsav Tsheb: 5 Cov Kauj Ruam (nrog Duab)
BBC Micro: me ntsis thiab khawb - Sib tham sib Steering Log & Tsav Tsheb: Ib qho ntawm kuv chav kawm ua haujlwm rau lub lim tiam no yog siv BBC Micro: me ntsis los cuam tshuam nrog Scratch program peb tau sau. Kuv xav tias qhov no yog lub sijhawm zoo tshaj los siv kuv ThreadBoard los tsim cov kab ke! Kuv qhov kev tshoov siab rau qhov khawb p
Kev Sib Tham Sib Tham Punching Hnab: 3 Cov Kauj Ruam (nrog Duab)
Interactive Reflex Punching Bag: Cov lus qhia no yog rau txhua tus neeg uas xav txhim kho lawv cov kev txawj ntse thiab kev txawj ntaus nrig thaum tau txais kev paub ntau dua, siv Arduino, LED's thiab MK 2125 Accelerometer
THIAB LUB NEEJ !! (Sib tham sib tham rooj sib tham): 4 Kauj Ruam
THIAB LUB NEEJ !! (sib tham sib tham txog Thruth Table): Nyob zoo cov phooj ywg, Kuv vam tias koj txhua tus nyob hauv koj lub tsev zoo thiab xav tsis thoob dab tsi ntawm cov ntaub ntawv uas muaj ?? Nkag siab cov rooj vag logic yog qhov tseem ceeb heev rau ob leeg
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Lub Rooj Sib Tham Lub Hwj Huam!: 6 Kauj Ruam (nrog Duab)
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Bench Power Supply!: Koj puas tau tsim koj qhov haujlwm tshiab thiab tuav rov qab los ntawm qhov koj tsis muaj kev tswj hwm koj li peev txheej? Zoo, qhov no yog qhov haujlwm rau koj! Hnub no kuv yuav qhia koj yuav ua li cas thiaj tsim tau lub rooj zaum hauv lub rooj zaum ua haujlwm tau zoo rau qhov pheej yig heev! Kuv tau ua qhov no tag nrho
Dot² - Kev Sib Tham Sib Tham Rooj: 12 Cov Kauj Ruam (nrog Duab)
Dot² - Kev Sib Tham Sib Tham Rooj: Thaum kuv xyaum ua haujlwm, Kuv tau tsim cov lus sib tham uas koj tuaj yeem khiav cov duab, qee qhov txaus nyiam LED Teeb thiab yog, Ua si tsev kawm ntawv qub ua si !! Kuv tau txais kev tshoov siab los tsim lub rooj kas fes no los ntawm crt4041's Music Visualiser Table yog tswj