Cov txheej txheem:
- Kauj Ruam 1: Teeb Lub Potmeter ntawm Arduino
- Kauj ruam 2: Teeb LCD
- Kauj ruam 3: Teem Up Slideshow
- Kauj Ruam 4: Piv Txwv Piv Txwv
Video: Desktop Organisor Nrog LCD: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
** Ua Edited **
Rau HKU arduino txoj haujlwm kuv txiav txim siab los ua lub khoos phis tawj uas muaj lub vijtsam LCD uas qhia txog kev tshoov siab kom tuaj tos koj thaum koj tig koj lub ntsuas cua!
Kuv yuav tau npog cov khoom siv thev naus laus zis feem ntau, tsuav koj tau txais qee yam zoo li lub thawv ntoo los nkaum koj Arduino thiab LCD hauv koj tus kheej oganisor tuaj yeem ua rau txhua daim ntawv xav tau.
Yam uas koj xav tau
- *arduino ib
- lauj kaub 'meter'
- *txiv neej prottyping xov hlau
- *LCD module! Nrog SD daim npav nyeem ntawv! (Kuv tau txais arduino tft LCD)
- *micro SD daim npav
- *ntoo (Kuv rov qab siv cov tub rau khoom qub qub thiab siv qee qhov ntoo seem, xyuas kom koj tuaj yeem tsim tsawg kawg yog lub thawv me me los nkaum koj cov arduino hauv!
Kauj Ruam 1: Teeb Lub Potmeter ntawm Arduino
txuas koj lub ntsuas 'meter' raws li qhia hauv daim duab
kom tau txais lub lauj kaub ntsuas kom ua haujlwm pib
Koj yuav tsum tau pib nrog qee qhov kev hloov pauv nyob rau saum koj daim duab ua ntej teeb tsa:
chaws:
const int analogInPin = A0; // Analog input tus pin uas tus potentiometer txuas rau
int sensorValue = 0; // tus nqi nyeem los ntawm lub lauj kaub int outputValue = 0; // tus nqi tso tawm rau PWM (analog tawm)
Hauv daim duab 2 Kuv qhia tias yuav ua li cas lub ntsuas hluav taws xob tau teeb tsa hauv lub voj void
chaws:
// nyeem cov analog hauv tus nqi:
sensorValue = analogRead (analogInPin); // daim ntawv qhia nws mus rau qhov ntau ntawm cov analog tawm: outputValue = daim ntawv qhia (sensorValue, 0, 1023, 0, 255); String stuffToPrint = Txoj hlua (outputValue); // hloov tus nqi analog tawm:
stuffToPrint.toCharArray (luam tawm, 9); // zoo li ntawv myScreen.setTextSize (1);
Serial.print ("sensor ="); Serial.print (sensorValue); Serial.print ("\ t tso tawm ="); Serial.println (outputValue);
ncua (50);
daim duab qhia chaw no piv cov ntaub ntawv los ntawm lub tshuab ntsuas hluav taws xob mus rau thaj tsam 0 txog 255, peb yuav siv qhov no los tswj peb cov duab swb lcd
Yog tias koj xav tau kev pab teeb tsa lub ntsuas hluav taws xob; Kuv siv cov cai los ntawm cov lus qhia muaj txiaj ntsig no, cov koob yog qhov zoo ib yam thiab yuav ua haujlwm nrog teeb tsa LCD hauv cov kauj ruam tom ntej.
www.toptechboy.com/arduino/lesson-11-arduin…
Kauj ruam 2: Teeb LCD
Teeb tus pin zoo li hauv qhov piv txwv saum toj no.
Thaum ua tiav qhov raug koj lub vijtsam yuav ci dawb.
Yog tias koj xav tau kev pab ntxiv lossis xav siv qee tus lej piv txwv los sim koj cov zaub koj tuaj yeem pom cov lus qhia ua haujlwm rau cov qauv no thiab nws yog tus piv txwv ntawm no
peb yuav siv qee qhov "kos duab los ntawm SD daim npav" hauv cov kauj ruam tom ntej.
Kauj ruam 3: Teem Up Slideshow
Tam sim no peb muaj Potmeter thiab LCD teeb tsa peb tuaj yeem teeb tsa "swb" uas siv tus kws ntsuas lub ntsuas qhov ntsuas
Siv qhov ntau ntawm 0 txog 255 peb tuaj yeem qhia txog qee yam uas peb tuaj yeem ua rau arduino los tso saib qee cov ntsiab lus ntawm LCD.
Thawj qhov piv txwv raws li qhia hauv duab:
yog (outputValue <51) {// range ib yog (rangeOne == tseeb) {rangeTwo = tseeb; myScreen.setRotation (90); myScreen.background (0, 0, 0); myScreen.stroke (255, 255, 255); myScreen.text ("Nyob zoo,", 10, 50); myScreen.text ("tig tus pin> rau", 10, 60); myScreen.text ("tau txais kev txhawb siab.", 10, 70); rangeOne = tsis tseeb;
Yog tias lub ntsuas hluav taws xob tig mus rau qhov qis dua 51, lub vijtsam nrog zaub (hauv hom duab = rotatio 90) qee cov ntawv.
Txhawm rau tuaj yeem tso saib cov duab kom ntseeg tau tias koj tus lej SD CS tau hais kom raug, lossis cov arduino yuav tsis pib ua SD (yog li nco ntsoov xyuas koj cov xov hlau !!)
Yog tias koj xav tshuaj xyuas koj tus lej LCD koj tuaj yeem xa mus rau phau ntawv qhia ua haujlwm "txuas lub vijtsam"
Kuv txhais kuv tus SD CS tus pin li 4 tam sim no vim tias kuv tau sib xyaw kuv cov xov hlau, piv txwv! - Kuv zoo siab los qhia qhov oopsie me me vim tias nws yuav txuag koj ntau lub sijhawm tshawb xyuas lub vev xaib rau "Ua tsis tau pib ua ntej" yuam kev. Qhov twg ntawm qee lub rooj sab laj nws tau hais tias kev kho yog kom muaj qee tus qauv ntawm SD daim npav. Yog li xyuas koj cov thaiv thawj zaug ua ntej yuav daim npav SD tshiab !!
Kauj Ruam 4: Piv Txwv Piv Txwv
#suav nrog
#include // Tsev qiv ntawv kho vajtse tshwj xeeb #suav nrog
#define SD_CS 4 #define CS 10 #define DC 9 #define RESET 8
const int analogInPin = A0; // Analog input tus pin uas tus potentiometer txuas rau
int sensorValue = 0; // tus nqi nyeem los ntawm lub lauj kaub int outputValue = 0; // tus nqi tso tawm rau PWM (analog tawm) bool rangeOne = muaj tseeb; bool rangeTwo = muaj tseeb; bool rangeThree = tseeb; bool rangeFour = tseeb; bool rangeFive = tseeb;
TFT myScreen = TFT (CS, DC, RESET);
PImage duab; const char printout [9];
teeb tsa tsis muaj dab tsi () {Serial.begin (9600); myScreen.begin (); // sim nkag mus rau SD daim npav Serial.print ("Initializing SD card …"); yog (! SD.begin (SD_CS)) {Serial.println ("ua tsis tiav!"); rov qab; } Serial.println ("OK!");
// pib thiab tshem tawm GLCD npo myScreen.begin (); myScreen.background (255, 255, 255);
} void loop () {// nyeem cov analog hauv tus nqi: sensorValue = analogRead (analogInPin); // daim ntawv qhia nws mus rau qhov ntau ntawm cov analog tawm: outputValue = daim ntawv qhia (sensorValue, 0, 1023, 0, 255); String stuffToPrint = Txoj hlua (outputValue); // hloov tus nqi analog tawm:
stuffToPrint.toCharArray (luam tawm, 9); // zoo li ntawv myScreen.setTextSize (1);
Serial.print ("sensor ="); Serial.print (sensorValue); Serial.print ("\ t tso tawm ="); Serial.println (outputValue);
ncua (50);
yog (outputValue rau ", 10, 60); myScreen.text (" tau txais kev txhawb zog. ", 10, 70); rangeOne = cuav;}} yog (outputValue> 52 && outputValue 102 && outputValue 154 && outputValue <205) { / /range plaub yog (rangeFour == muaj tseeb) {rangeThree = tseeb; rangeFive = muaj tseeb; myScreen.setRotation (90); myScreen.background (255, 255, 255); // tshem qhov screen duab = myScreen.loadImage ("quote2.bmp "); // sau cov duab ntawm qhov screen myScreen.image (duab, 0, 0); myScreen.stroke (255, 255, 255); myScreen.text (" Kuv txaus siab heev ", 10, 50); myScreen.text ("ntawm koj!", 10, 60); rangeFour = cuav;}}
yog (outputValue> 206 && outputValue
Pom zoo:
Samytronix Pi: DIY Raspberry Pi Desktop Computer (nrog Accessible GPIO): 13 Kauj Ruam (nrog Duab)
Samytronix Pi: DIY Raspberry Pi Desktop Computer (nrog Accessible GPIO): Hauv qhov haujlwm no peb yuav ua Raspberry Pi Desktop computer uas kuv hu ua Samytronix Pi. Lub khoos phis tawj desktop tsim no feem ntau yog ua los ntawm 3mm laser txiav acrylic ntawv. Samytronix Pi tau nruab nrog HD saib, hais lus, thiab tseem ceeb tshaj plaws nkag tau
I2C / IIC LCD Zaub - Siv SPI LCD rau I2C LCD Zaub Siv SPI rau IIC Module Nrog Arduino: 5 Kauj Ruam
I2C / IIC LCD Zaub | Siv SPI LCD rau I2C LCD Zaub Siv SPI rau IIC Module Nrog Arduino: Nyob zoo cov phooj ywg txij li ib txwm muaj SPI LCD 1602 muaj xov tooj ntau dhau los txuas yog li nws nyuaj rau cuam tshuam nrog arduino tab sis muaj ib qho qauv muaj nyob hauv khw uas tuaj yeem hloov SPI zaub rau hauv IIC zaub yog li ntawd koj yuav tsum txuas tsuas yog 4 xov hlau
SENSOR SUHU DENGAN LCD DAN LED (Ua Kub Sensor Nrog LCD thiab LED): 6 Cov Kauj Ruam (nrog Duab)
SENSOR SUHU DENGAN LCD DAN LED (Ua Kub Sensor Nrog LCD thiab LED): hai, hais Devi Rivaldi mahasiswa UNIVERSITAS NUSA PUTRA dari Indonesia, di sini saya akan berbagi cara membuat sensor suhu menggunakan Arduino dengan Output ke LCD dan LED. Kuv tsis xav kom muaj kev xav hais tias xa mus, muaj cov sensor zoo li no thiab
Tsheb kauj vab taug qab System nrog Tuag Tus Txiv Neej Alert Nrog Sigfox: 7 Cov Kauj Ruam (nrog Duab)
Tsheb kauj vab taug qab System Nrog Tuag Tus Txiv Neej Alert Nrog Sigfox: Kev ruaj ntseg rau cov neeg caij tsheb kauj vab nrog taug qab thiab xa cov yam ntxwv ceeb toom. Thaum muaj xwm txheej ceeb toom raug xa nrog GPS txoj haujlwm.Kev ruaj ntseg rau cov neeg caij tsheb kauj vab yog qhov yuav tsum tau, nrog kev tsheb kauj vab lossis tsheb kauj vab roob sib tsoo tshwm sim thiab sai li sai tau thaum muaj xwm txheej ceev
Tshem Tawm Lub Hwj Huam Standby Nrog Lub Hwj Huam Desktop Hloov!: 7 Cov Kauj Ruam (nrog Duab)
Tshem Tawm Lub Hwj Chim Standby Nrog Lub Hwj Huam Desktop Hloov!: Peb txhua tus paub tias nws tau tshwm sim. Txawm tias thaum koj cov cuab yeej siv (TV, khoos phis tawj, hais lus, sab nraud nyuaj tsav, saib, thiab lwm yam) tau tig " OFF, " lawv tseem ua tau tiag tiag, nyob rau hauv hom standby, nkim lub zog. Qee lub TV TV ntshav siv lub zog ntau dua hauv