Cov txheej txheem:
- Kauj Ruam 1: Kub Sensor
- Kauj ruam 2: Buzzer
- Kauj Ruam 3: Tus Kws Kho Qhov Muag/Phototransistor
- Kauj ruam 4: Servo
Video: EF 230: Tsev Txheej Txheem 3000 Qhia: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Lub Tsev Hauv Tsev 3000 yog lub cuab yeej siv Arduino, ntsuas kub, ntsuas lub suab piezo, lub ntsuas ntsuas pom qhov muag/duab hluav taws xob, thiab servo los tso saib txoj hauv kev txhim kho kev siv hluav taws xob hauv tsev.
Kauj Ruam 1: Kub Sensor
· Khiav koj lub zog thiab cov xov hlau hauv av los ntawm
lub micro tswj mus rau sab ntawm lub khob cij board
· Muab qhov ntsuas kub tso rau hauv lub khob cij, thiab khiav lub zog sib xws thiab cov xov hlau hauv av kom haum
· Tshaj tawm tias qhov ntsuas kub muaj peb ntu, thiab qhov nruab nrab nruab nrab muaj cov xaim uas khiav los ntawm qhov chaw nres nkoj "A0".
· Txoj cai ntsuas kub:
teb = questdlg ('Thov khiav arduino thiab servo pib code', 'teb', 'Ok', 'Ok')
prompt = 'Nias ib qho yuam sij kom pib'
ncua
prompt1 = 'Teeb tsa qhov kub tsawg kawg'
x = input (prompt1)
prompt2 = 'Teeb tsa qhov siab tshaj plaws'
y = tawm tswv yim (prompt2)
prompt3 = 'nias ib qho yuam sij kom pib'
ncua
daim duab
h = animatedline;
ax = gca;
ax. YGrid = 'rau';
ax. YLim = [65 85];
nres = tsis tseeb;
startTime = datetime ('tam sim no');
thaum ~ nres
% Nyeem qhov nqi hluav taws xob tam sim no
v = readVoltage (a, 'A0');
% Xam qhov ntsuas kub ntawm qhov hluav taws xob (raws cov ntaub ntawv)
TempC = (v - 0.5)*100;
TempF = 9/5*TempC + 32;
% Tau txais lub sijhawm tam sim no
t = datetime ('tam sim no') - startTime;
% Ntxiv cov ntsiab lus rau cov yeeb yaj kiab
cov ntsiab lus ntxiv (h, datenum (t), TempF)
Hloov tshiab axes
ax. XLim = datenum ([t-seconds (15) t]));
datetick ('x', 'keeplimits')
kos duab
% Txheeb tseg qhov xwm txheej
nres = readDigitalPin (a, 'D12');
Kauj ruam 2: Buzzer
· Hlau hauv lub tswb nrov uas yuav siv los teeb liab nyeem ntawv siab lossis kub heev
· Tsis muaj xov hlau khiav los ntawm kab ntawv zoo mus rau sab zoo ntawm lub suab nrov
· Hloov chaw xaim tau khiav los ntawm qhov zoo ntawm lub suab nrov mus rau qhov chaw nres nkoj sau tias "11"
Qhov no yuav raug siv tom qab txhawm rau hu qhov chaw ntawm lub buzzer hauv cov ntawv sau.
· Code rau buzzer:
yog TempF> = y
disp ('kaw qhov rooj nws kub')
playTone (a, 'D11', 500, 1)
elseif TempF <= x
disp ('kaw qhov rooj nws txias')
playTone (a, 'D11', 250, 1)
kawg
kawg
Kauj Ruam 3: Tus Kws Kho Qhov Muag/Phototransistor
· Qhov ntsuas no xav tau cov neeg tawm tsam tsis zoo li lwm tus
· Xyuas kom tseeb tias tag nrho plaub txoj hlua ntawm lub ntsuas tau suav nrog hauv lub voj tom qab ntsaws cov xov hlau
· Lub ntsuas pom pom qhov hloov pauv ntawm lub teeb, sawv cev rau kev txav, thiab sau nws raws li kev nkag
· Txoj Cai rau Kev Tshawb Fawb Txog Qhov Muag/Phototransistor:
meej a
a = arduino ('/dev/tty.usbserial-DN01DVI2', 'Uno', 'Libraries', 'Servo');
sai = 'Teeb lub teeb theem pib'
z = input (tam sim)
LightLevel = 0
thaum lub teebLevel ~ = -1
lightLevel = readVoltage (a, 'A1')
Yog hais tias lightLevel> = z
teb = questdlg ('xav xav hloov AC?', 'Yog', 'Tsis yog')
hloov teb
rooj plaub 'Yog'
answer2 = questdlg ('Tig AC nce lossis nqis?', 'teb', 'Down', 'Up', 'Up')
hloov lus teb 2
rooj 'Down'
s = servo (ib, 'D10');
rau lub kaum ntse ntse = 0:.1:.5
writePosition (s, kaum sab xis);
current_position = readPosition (cov);
current_position = tam sim no qhov chaw * 180;
% luam tawm txoj haujlwm tam sim no ntawm servo motor
fprintf ('Txoj haujlwm tam sim no yog %d / n', qhov chaw tam sim no);
% kev ncua sijhawm me me yog xav tau kom servo tuaj yeem ua haujlwm ntawm
% lub kaum sab xis hais rau nws.
ncua (2);
kawg
% coj rov qab lub cev muaj zog mus rau 0 txoj haujlwm
sauPosition (s, 0);
meej s
prompt = 'Nias ib qho tseem ceeb txuas ntxiv mus'
questdlg ('AC tau tso tseg', 'teb', 'Ok', 'Ok')
rooj 'Up'
s = servo (ib, 'D10');
rau lub kaum ntse ntse =.5:.1: 1
writePosition (s, kaum sab xis);
current_position = readPosition (cov);
current_position = tam sim no qhov chaw * 180;
% luam tawm txoj haujlwm tam sim no ntawm servo motor
fprintf ('Txoj haujlwm tam sim no yog %d / n', qhov chaw tam sim no);
% kev ncua sijhawm me me yog xav tau kom servo tuaj yeem ua haujlwm ntawm
% lub kaum sab xis hais rau nws.
ncua (2);
kawg
Kauj ruam 4: Servo
· Cov servo sawv cev
lub tshuab cua txias, thiab yog qhov tso tawm ntawm lub suab ntsuas pom
· Nws yuav tsum muaj cov xaim zoo, xaim av, thiab xaim los ntawm chaw nres nkoj "D9" mus rau servo
· Code rau servo:
% coj rov qab lub cev muaj zog mus rau 0 txoj haujlwm
sauPosition (s, 0);
meej s
prompt = 'Nias ib qho tseem ceeb txuas ntxiv mus'
questdlg ('AC tig', 'teb', 'Ok', 'Ok')
kawg
kawg
ncua
so
kawg
kawg
*Lus ceeb toom tshwj xeeb: qee qhov chaws rau servo tau koom ua ke nrog cov cai rau lub ntsuas qhov muag/phototransistor.
Pom zoo:
Xim Txheej Txheem Txheej Txheem: Arduino Raws Li Txheej Txheem Nrog Ob Txoj Siv: 8 Kauj Ruam
Xim Txheej Txheem Txheej Txheem: Arduino Raws Li Txheej Txheem Nrog Ob Txoj Siv: Kev thauj mus los thiab/lossis ntim khoom ntawm cov khoom thiab cov khoom hauv thaj chaw ua haujlwm tau ua tiav siv cov kab ua siv siv txoj siv thauj khoom. Cov menyuam no pab txav cov khoom ntawm ib kis mus rau lwm qhov nrog qhov nrawm. Qee qhov kev ua lossis kev qhia paub ua haujlwm yuav yog
Cov Txheej Txheem Hluav Taws Xob rau FTC Robots - Cov Txheej Txheem thiab Cov Lus Qhia: 4 Cov Kauj Ruam
Muaj Cov Txheej Txheem Hluav Taws Xob rau FTC Neeg Hlau - Cov Txheej Txheem thiab Cov Lus Qhia: Ntau pawg FTC tso siab rau cov txheej txheem thaiv yooj yim thiab cov cuab yeej los teeb tsa hluav taws xob rau lawv cov neeg hlau. Txawm li cas los xij, cov txheej txheem yooj yim no thiab cov ntaub ntawv yuav tsis txaus rau cov kab hluav taws xob xav tau ntau dua. Txawm hais tias koj pab neeg tab tom siv kev paub ntau dua
D4E1: Kev nyeem ntawv-cuab yeej 2.0 (Txheej Txheem Txheej Txheem Txheej Txheem): 9 Cov Kauj Ruam (nrog Duab)
D4E1: Kev nyeem ntawv-cuab yeej 2.0 (Txheej Txheem Txheej Txheem Txheej Txheem): Cov ntaub ntawv:-Ob tus tub ntxhais kawm Muaj cov khoom lag luam tsim qauv hauv Kortrijk (Belgium) tuaj nrog cov cuab yeej nyeem ntawv no. Peb pib raws qhov tsim qauv uas twb muaj lawm thiab tau txhim kho nws mus rau lwm qhov kev tsim. Kev nyeem ntawv-cuab yeej thaum xub thawj tau raug txhim kho rau cli & nte
Nthuav Tawm Cov Txheej Txheem Qhia Ntawv rau Tus Tsim-Media Loading thiab Txheej Txheem: 13 Kauj Ruam
Nthuav Tawm Cov Txheej Txheem Txheej Txheem rau Tus Tsim-Media Loading thiab Txheej Txheem: Kev ua haujlwm tuaj yeem thauj ntau cov ntaub ntawv sab nraud, ntawm cov uas muaj peb hom uas nquag siv. Lawv yog cov duab, suab thiab yees duab sib cais. Hauv tshooj lus no, peb yuav tham txog yuav ua li cas thauj lub suab thiab yees duab kom ntxaws, suav nrog qhov tshwm sim
Nthuav nthuav Cov Txheej Txheem Qhia rau Tus Tsim Qauv-Txheej Txheem Txheej Txheem Tswj- Loop Nqe Lus: 8 Kauj Ruam
Nthuav nthuav Cov Txheej Txheem Qhia rau Tus Tsim-Txheej Txheem Txheej Txheem- Loop Nqe Lus: Cov Txheej Txheem Txheej Txheem- Loop Nqe Lus Los ntawm tshooj no, koj yuav ntsib nrog qhov tseem ceeb thiab muaj zog paub txog-Loop Nqe Lus. Ua ntej nyeem tshooj no, yog tias koj xav kos 10,000 lub voj voos hauv txoj haujlwm, koj tsuas tuaj yeem ua nrog lub suab