Cov txheej txheem:

Crazy Modular Teeb: 6 Cov Kauj Ruam (nrog Duab)
Crazy Modular Teeb: 6 Cov Kauj Ruam (nrog Duab)

Video: Crazy Modular Teeb: 6 Cov Kauj Ruam (nrog Duab)

Video: Crazy Modular Teeb: 6 Cov Kauj Ruam (nrog Duab)
Video: Yog ntuj tsis pab ntshe kuv tuag lawm 8/6/2018 2024, Kaum ib hlis
Anonim
Image
Image

Lub tswv yim yog los tsim lub teeb tshwj xeeb uas cov neeg siv yuav teeb tsa raws li lawv nyiam, ua kom zoo dua ntawm qhov chaw tshwj xeeb uas lawv xav siv. Lub teeb yuav dimmable thiab tswj los ntawm kov. Kev siv lub teeb ntawm lub teeb no yog kaw lub Circuit Court siv qhov muag sib hloov.

Cov ntaub ntawv:

Tooj liab liab

Ntoo

Tooj hlau

Tooj tooj liab

Acrilic

Hlau Daim Kab Xev

Kub nplaum phom thiab kua nplaum

SMD LEDs

Hlau Tsis Raug Tshem Tawm

Arduino

Ultrasonic Sensor

Hloov Force-Sensitive Resistor (FSR)

10k thiab 220 Ohm resistors

Solder + Soldering hlau

Txiab

X-acto/Cutter

Tus kav

Kauj Ruam 1: Tsim Kev Sib Txuas Hluav Taws Xob thiab Cov Hluav Taws Xob

Tsim Kev Sib Txuas Hluav Taws Xob thiab Cov Xov Tooj
Tsim Kev Sib Txuas Hluav Taws Xob thiab Cov Xov Tooj
Tsim Kev Sib Txuas Hluav Taws Xob thiab Cov Xov Tooj
Tsim Kev Sib Txuas Hluav Taws Xob thiab Cov Xov Tooj

Txhawm rau pib koj yuav tsum teeb tsa qhov txuas ntawm Arduino thiab lub teeb.

Hauv qhov no cov hlau nplaum yog qhov kev xaiv zoo los ua lub zog hluav taws xob tam sim no thiab kom muaj lub zog txuas uas tshem tau.

Koj yuav tsum muaj lub xov tooj hluav taws xob ua tiav thiab tom qab ntawd txiav ob qho kawg ze rau Arduino qhov kawg ntawm txoj hlua. Los ntawm kev tshawb nrhiav cov kab xim txuas cov hlau nplaum rau txhua tus ntawm lawv thiab txoj kab (hauv qhov no nrog cov khoom siv lego) txhua tus kom lawv tsis txhob kov ib leeg.

Tam sim no ua tib yam nrog lwm qhov kawg ntawm kab ntawv kom koj tuaj yeem ua tiav lub zog khiav.

Tswv yim: thov paub txog qhov teeb tsa xim thiab cov lus qhia rau ntsaws lub cable.

Kauj ruam 2: Tshawb nrhiav Circuit

Tshawb nrhiav Circuit
Tshawb nrhiav Circuit
Tshawb nrhiav Circuit
Tshawb nrhiav Circuit
Tshawb nrhiav Circuit
Tshawb nrhiav Circuit

Tam sim no, tshawb xyuas lub voj voog nrog lub rooj mov ci, ua raws cov qauv hauv cov duab, sib sau ua ke thiab ntsuas lub voj voog nrog lub khob cij ua ntej koj siv daim kab xev tooj liab thiab cov hlau txuas.

Tswv yim: Rau lub zog ntsuas yuav siv 10K tus tiv thaiv thiab rau LED yog 220 tus tiv thaiv.

Kauj Ruam 3: Tsim Tus Qauv thiab Qij

Tsim Tus Qauv thiab Qij
Tsim Tus Qauv thiab Qij
Tsim Tus Qauv thiab Qij
Tsim Tus Qauv thiab Qij
Tsim Tus Qauv thiab Qij
Tsim Tus Qauv thiab Qij

Txhawm rau tsim cov qauv siv koj lub tswv yim, koj yuav tsum muaj 3 yam tseem ceeb hauv siab.

1. Lub thawv ntawv yuav tsum muaj chaw txaus rau arduino thiab Circuit.

2. Qhov thaiv yuav tsum muaj kev nkag tau yooj yim rau hauv Circuit.

3. Cov Qauv yuav tsum muaj tus tuav rau lub qhov muag nqa qhov zoo thiab qhov tsis zoo tam sim no los ntawm kev kaw lub kaw lus.

Siv ntoo thiab cov khoom siv uas koj xav tsim lub hauv paus loj thiab lub hauv paus rau lub teeb. Koj tuaj yeem siv cov duab ntawm lub teeb no kom muaj lub tswv yim rau koj tsim.

Kauj Ruam 4: Teeb Txoj Cai

Teeb Txoj Cai
Teeb Txoj Cai

Siv tus lej piv txwv los teeb tsa koj lub Circuit Court thiab Arduino.

#include "SR04.h" #define TRIG_PIN 12#txhais ECHO_PIN 13 SR04 sr04 = SR04 (ECHO_PIN, TRIG_PIN); ntev a; const int sensorPin = A0; const int ledPin = 9; koj fadeValue; tus nqi;

teeb tsa tsis muaj dab tsi () {Serial.begin (9600); tus pinMode (ledPin, OUTPUT); }

void voj () {

tus nqi = analogRead (sensorPin); Serial.println (tus nqi); value = daim ntawv qhia (tus nqi, 0, 1023, 0, 255); thaum (tus nqi> 1 && tus nqi <255) {a = sr04. Distance (); Serial.print (a); Serial.println ("cm"); ncua (100); yog (a == 3) {analogWrite (ledPin, 0); } yog (a == 8) {analogWrite (ledPin, 10); } yog (a == 12) {analogWrite (ledPin, 60); } yog (a == 18) {analogWrite (ledPin, 100); } yog (a == 22) {analogWrite (ledPin, 180); } yog (a == 30) {analogWrite (ledPin, 255); }

}

}

Kauj Ruam 5: Teeb Teeb Teeb Tiav

Teeb Teeb Teeb Tiav
Teeb Teeb Teeb Tiav
Teeb Teeb Teeb Tiav
Teeb Teeb Teeb Tiav
Teeb Teeb Teeb Tiav
Teeb Teeb Teeb Tiav

Tam sim no koj muaj cov qauv thiab qhov muag teev koj tuaj yeem teeb lub teeb. Nco ntsoov:

1. Kov khawm tso cai rau lub ntsuas kom pib nyeem ntawv.

2. Lub dimmer yog tswj los ntawm koj txhais tes, yog nws nyob ze ntawm lub teeb nws yuav tua, yog tias txuas ntxiv lub teeb yuav ci dua.

3. Koj tuaj yeem hloov qhov muag teev tau txhua lub sijhawm.

Tswv yim: Nco ntsoov tias lub teeb LED muaj ib sab (zoo thiab tsis zoo).

Kauj Ruam 6: Txaus Siab Rau Koj Qhov Kho Kom Zoo Nkauj Tshiab

Txaus Siab Rau Koj Qhov Kho Kom Zoo Nkauj Tshiab
Txaus Siab Rau Koj Qhov Kho Kom Zoo Nkauj Tshiab

Muab koj lub teeb tso rau hauv koj lub tsev thiab txaus siab rau koj lub tsev tshiab ua kom zoo nkauj.

Pom zoo: