Cov txheej txheem:
Video: Arduino I2C Sniffer: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
I2C yog cov txheej txheem sib txuas uas siv los sib txuas lus lub microcontroller nrog cov khoom siv sab nraud txuas rau tib lub Circuit Court. Txhua qhov khoom siv sab nrauv yuav tsum muaj tus lej ID tshwj xeeb hu ua chaw nyob uas tau siv los txheeb xyuas nws raws li tus neeg tau txais cov lus tau muab. Cov chaw nyob ntawd tau muab los ntawm cov chaw tsim khoom thiab feem ntau tsis tuaj yeem hloov pauv. Tus hnoos hnoos scans txhua qhov chaw nyob uas tuaj yeem nrhiav cov khoom sib txuas thiab tshaj tawm qhov nws pom. Qhov no pab txheeb xyuas cov cim tsis muaj cim raws li qhov chaw nyob tuaj yeem tehn tau googled rau cov ntaub ntawv ntau ntxiv hais txog lub nti.
Cov cuab yeej no ua piv txwv ntawm Arduino UNO tus cwj pwm ntawm Raspberry Pi i2cdetect tsab ntawv, hnia txhua qhov ua tau i2c chaw nyob nrhiav cov khoom siv sib txuas thiab luam tawm cov txiaj ntsig zoo ntawm 16x02 LCD npo.
Txhawm rau kom haum txhua yam ntawm lub vijtsam, ob qhov siab thiab qis ntawm qhov chaw nyob tau luam tawm saum toj no cov txiaj ntsig, qhov siab tau ua ntawm tus qauv siab tawv. Ob lub laub khawm tso cai taug kev ntawm cov chaw nyob, qhia 16 chaw nyob ib lub sijhawm. Yog tias pom lub cuab yeej, W yuav luam tawm los qhia nws ua qhov chaw nyob sau ntawv thiab R yuav raug qhia thaum nws yog chaw nyob nyeem ntawv. Yog tias tsis pom dab tsi ntawm qhov chaw nyob ntawd, tus hyphen (-) yuav tshwm ntawm qhov screen.
Kauj ruam 1: Cov ntaub ntawv
Kev xaiv 1
1 x Arduino UNO
1 x 16 x 02 LCD npo
1 x 10K potentiometer
1 x 330 ohm resistor
3 X laub khawm
Jumper cables
1x I2C qib hloov pauv (tsis nyob ntawm cov ntaub ntawv duab)
Kev xaiv 2
1 x Arduino UNO
LCD Keypad Shield (cov nyees khawm ntawm daim thaiv yuav tsis siv)
3 X laub khawm
Jumper cables
1x I2C qib hloov pauv (tsis nyob ntawm cov ntaub ntawv duab)
Qhov Xaiv 2 yog qhov uas yuav tsim vim tias yog qhov kuv muaj ntawm tes tam sim no. Cov theem hloov pauv yog ib feem tseem ceeb ntawm Circuit Court vim niaj hnub no cov cuab yeej siv 3.3V cov laj thawj thiab 5V los ntawm Arduino ua rau lawv puas tsuaj.
(Ntawm cov duab, tsis xav tau cov khoom hla hla.)
Kauj ruam 2: Circuit Court
Lub voj voog zoo nkauj ncaj nraim rau tom ntej, siv tus qauv pinout rau Arduino piv txwv rau LCD, tus pin tsis zoo rau I2C thiab 3 tus pin txuas ntxiv rau lub khawm.
Nyob rau hauv rooj plaub koj siv LCD Keypad Shield, pinout rau LCD hloov pauv tab sis qhov ntawd twb tau txiav txim siab hauv txoj cai. Cov LCD Keypad Shield cov nyees khawm tsis siv vim tias lawv xav tau cov txheej txheem pov npav sib xws uas ua txhaum kev sib haum xeeb ntawm ob qhov kev siv ua tau zoo (Shield thiab sawv ib leeg LCD)
Kauj ruam 3: Code
Nyob rau hauv rooj plaub LCD Keypad Shield tau siv, #define LCD_SHIELD yuav tsum tso tseg yam tsis xav txog thaum pib ntawm daim duab. Txwv tsis pub, tawm tswv yim rau nws siv thawj daim duab.
Kauj ruam 4: Cov lus xaus
Rau kev sim cov cai thiab kev siv hluav taws xob, BQ32000 RTC nti thiab MMA8452Q accelerometer tau siv. Raws li pom hauv daim duab, lub cuab yeej kuaj pom 4 chaw nyob: 0x3A thiab 0xD0 raws li sau chaw nyob, thiab 0x3B thiab 0xD1 raws li nyeem chaw nyob. Qhov chaw nyob no sib raug rau cov cuab yeej ntsuas kom tus lej ua haujlwm.
Kuv xav ua tsaug rau cov ntxhais zoo ntawm Beijing Makerspace, Fu Yao thiab Liu Xin, rau kev pab kuv kom tau txais cov ntaub ntawv xav tau los ntsuas qhov haujlwm no ntawm daim ntawv ceeb toom luv luv 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
Arduino UNO Logic Sniffer: 8 Kauj Ruam (nrog Duab)
Arduino UNO Logic Sniffer: Txoj haujlwm no pib ua qhov kev sim yooj yim. Thaum kuv tshawb fawb txog ATMEGA328P cov ntawv rau lwm qhov haujlwm, Kuv pom qee yam uas ntxim nyiam. Timer1 Lub Tswv Yim Ntsuas Lub Tsev. Nws tso cai rau peb Arduino UNO's microcontroller txhawm rau txheeb xyuas lub teeb liab
Particle Sniffer: 6 Kauj Ruam (nrog Duab)
Particle Sniffer: Thaum ua haujlwm nrog cov phiaj xwm ua ntej ntawm PM2.5 kev ntsuas kuv pom qhov tsis zoo ntawm qhov tsis tuaj yeem nrhiav cov ntsiab lus ntawm cov pa phem me me. Feem ntau kev ntsuas ua tiav los ntawm cov nroog thiab cov duab satellite tau sau ntau qhov chaw uas tsis
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
Snorkel Sniffer: 4 Kauj Ruam
Snorkel Sniffer: Lub qhov rooj raug kaw ntawm lub davhlau thiab ib yam li ntau lwm lub davhlau zoo sib xws ua rau tsaug zog ntau dhau ua rau koj. Raws li peb tau them se, Kuv tau tsaug zog los ntawm ib tug poj niam nyob rau pem hauv ntej ntawm peb quaj qw " pab nws! &Quot; " pab nws !!!! " "