Cov txheej txheem:
- Kauj Ruam 1: Teeb Kho Vajtse
- Kauj ruam 2:
- Kauj ruam 3:
- Kauj ruam 4:
- Kauj ruam 5:
- Kauj Ruam 6: Teeb Software thiab Siv…
- Kauj Ruam 7: Yuav Tswj Li Cas Lub Hnab Hnab Hauv Koj Daim Duab …
- Kauj Ruam 8: Hloov Chaw Nyob I2C Bus
Video: Siv PCF8574 Backpacks Nrog LCDs thiab Arduino: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Siv LCD cov qauv nrog koj Arduino yog qhov nrov, txawm li cas los xij cov xov hluav taws xob xav tau sijhawm thiab ua siab ntev los xaim nws kom raug - thiab tseem siv ntau cov lej tso tawm digital.
Tias yog vim li cas peb thiaj nyiam cov txheej txheem hnab ev khoom no - lawv haum rau sab nraum qab ntawm koj lub LCD module thiab tso cai txuas rau koj Arduino (lossis lwm lub rooj tsav xwm kev txhim kho) nrog tsuas yog plaub lub xov tooj - lub zog, GND, cov ntaub ntawv thiab moos. Koj tuaj yeem siv qhov no nrog LCD cov qauv uas muaj HD44780-sib cuam tshuam nrog ntau qhov screen loj.
Lub hnab ev ntawv kuj tseem siv tau nrog 20 x 4 LCDs. Qhov tseem ceeb yog tias koj lub LCD yuav tsum muaj cov khoom sib cuam tshuam hauv ib kab ntawm kaum rau, yog li nws sib phim cov koob ntawm lub hnab ev ntawv raws li qhia hauv daim duab rau cov kauj ruam no.
Kauj Ruam 1: Teeb Kho Vajtse
Tam sim no cia pib. Ua ntej koj yuav tsum tau muab lub hnab ntim rau hauv koj lub LCD module. Thaum koj cov hlau txuas ua kom sov dua, xyuas tias lub hnab ev ntawv pins ncaj thiab haum rau hauv LCD module, piv txwv li:
Kauj ruam 2:
Tom qab ntawd muab tshuaj txhuam rau hauv tus pin thawj, thaum khaws lub hnab ev ntawv nrog lub LCD:
Kauj ruam 3:
Yog tias nws me ntsis nkhaus, koj tuaj yeem rov ua kom sov dua thiab rov ua dua. Thaum koj txaus siab nrog kev sib koom ua ke, muab tshuaj txhuam rau ntawm tus pin:
Kauj ruam 4:
Tam sim no txhawm rau khaws cov khoom kom huv, txiav tawm cov header pins tshaj:
Kauj ruam 5:
Thaum koj tau ua tiav kev txiav cov kab taub hau, tau txais plaub tus txiv neej rau poj niam jumper xov hlau thiab txuas lub LCD module rau koj Arduino raws li qhia hauv cov duab hauv qab no thiab cov lus. Tom qab ntawd txuas koj Arduino rau lub khoos phis tawj ntawm USB
Kauj Ruam 6: Teeb Software thiab Siv…
Cov kauj ruam tom ntej yog rub tawm thiab teeb tsa Arduino I2C LCD tsev qiv ntawv rau siv nrog lub hnab ev ntawv. Ua ntej tshaj plaws, hloov npe "LiquidCrystal" lub tsev qiv ntawv tais ceev tseg hauv koj lub tsev qiv ntawv Arduino. Peb ua qhov no tsuas yog khaws nws ua cov thaub qab.
Yog tias koj tsis paub meej qhov twg tuaj yeem pom koj lub tsev qiv ntawv ntawv nplaub tshev - feem ntau yog hauv koj phau ntawv teev npe, uas nws qhov chaw nyob feem ntau tuaj yeem pom hauv Arduino IDE nyiam cov ntawv qhia zaub mov.
Tom ntej no, mus ntsib https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads thiab rub tawm cov ntawv tshiab, tam sim no peb tab tom siv v1.2.1. Nthuav rub tawm.zip cov ntaub ntawv yuav nthuav tawm qhov tshiab "LiquidCrystal" nplaub tshev - luam qhov no rau hauv koj phau ntawv Arduino cov tsev qiv ntawv.
Tam sim no rov pib dua Arduino IDE yog tias nws twb tau ua haujlwm lawm - lossis qhib nws tam sim no. Txhawm rau sim tus qauv peb muaj daim qauv qhia ua piv txwv npaj, tsuas yog luam thiab xa cov duab kos hauv qab no:
/ * Daim duab qhia ua piv txwv rau PCF8574T I2C LCD Backpack Siv lub tsev qiv ntawv los ntawm https://bitbucket.org/fmalpartida/new-liquidcryst… GNU Daim Ntawv Tso Cai Pej Xeem, version 3 (GPL-3.0) */ #suav nrog "Wire.h"
#suav nrog "LCD.h"
#suav nrog "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd (0x27, 2, 1, 0, 4, 5, 6, 7); // 0x27 yog I2C chaw nyob tsheb npav rau lub hnab ntim khoom uas tsis tau hloov kho
void teeb tsa ()
{// qhib LCD module lcd.begin (16, 2); // rau 16 x 2 LCD module lcd.setBacklightPin (3, POSITIVE); lcd.setBacklight (HIGH); }
void lub voj ()
{lcd.home (); // teeb tus cursor rau 0, 0 lcd.print ("tronixlabs.com"); lcd.setCursor (0, 1); // mus pib ntawm kab thib 2 lcd.print (millis ()); ncua (1000); lcd.setBacklight (QIB); // Backlight tawm ncua (250); lcd.setBacklight (HIGH); // Backlight ntawm ncua (1000); }
Tom qab ob peb lub sijhawm LCD yuav pib ua haujlwm thiab pib tso tawm peb qhov URL thiab tus nqi rau millis, tom qab ntsais qhov teeb pom kev tawm thiab qhib. Yog tias cov ntawv tsis meej, lossis koj tsuas yog pom cov thaiv dawb - sim kho qhov sib piv siv lub hwj chim loj nyob tom qab ntawm tus qauv.
Kauj Ruam 7: Yuav Tswj Li Cas Lub Hnab Hnab Hauv Koj Daim Duab …
Raws li kev tawm tsam siv lub LCD module yam tsis muaj lub hnab ntim khoom, muaj ob peb kab ntxiv ntawm cov cai kom suav nrog hauv koj cov duab kos. Txhawm rau tshuaj xyuas cov no, qhib qhov piv txwv piv txwv uas tau hais ua ntej.
Koj yuav xav tau cov tsev qiv ntawv raws li qhia hauv kab 3, 4 thiab 5 - thiab pib ua tus qauv raws li qhia hauv kab 7. Nco ntsoov tias qhov chaw nyob hauv I2C npav tsis yog 0x27 - thiab thawj qhov ntsuas hauv LiquidCrystal_I2C ua haujlwm.
Thaum kawg peb kab siv hauv qhov tsis muaj teeb tsa () kuj tseem yuav tsum tau pib ua LCD. Yog tias koj siv 20x4 LCD module, hloov qhov tsis nyob hauv lcd.begin () muaj nuj nqi. Los ntawm qhov no koj tuaj yeem siv txhua tus txheej txheem LiquidCrystal ua haujlwm xws li lcd.setCursor () txav tus cursor thiab lcd.write () los tso saib cov ntawv lossis hloov pauv li qub.
Lub teeb nrig kuj tseem tuaj yeem qhib thiab kaw nrog lcd.setBacklight (HIGH) lossis lcd.setBacklight (LOW). Koj tuaj yeem tua lub teeb nrig mus tas li los ntawm kev tshem lub cev jumper nyob tom qab ntawm tus qauv.
Kauj Ruam 8: Hloov Chaw Nyob I2C Bus
Yog tias koj xav siv ntau dua ib tus qauv, lossis muaj lwm lub cuab yeej ntawm I2C npav nrog chaw nyob 0x27 ces koj yuav tsum hloov chaw nyob uas siv ntawm tus qauv. Muaj yim txoj kev xaiv los ntawm, thiab cov no raug xaiv los ntawm kev siv ntau dua ib lossis ntau qhov ntawm cov hauv qab no.
Muaj yim qhov ua tau ua ke, thiab cov no tau piav qhia hauv Table 4 ntawm PCF8574 cov ntaub ntawv uas tuaj yeem rub tawm los ntawm TI lub vev xaib. Yog tias koj tsis paub meej txog qhov chaw nyob npav siv los ntawm tus qauv, tsuas yog txuas nws rau koj Arduino raws li tau piav ua ntej thiab khiav I2C scanner sketch los ntawm Arduino chaw ua si.
Txwv tsis pub peb vam tias koj nyiam nyeem phau ntawv qhia no thiab tuaj yeem siv nws. Yog tias koj muaj lus nug txog cov ntsiab lus hauv qhov kev qhia no, thov nug ntawm no lossis email [email protected]. Thiab thov mus ntsib PMD Way Limited.
Pom zoo:
Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)
Kev Siv Xov Tooj Ntawm Lub Xov Tooj Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: Koj puas tau xav tsim qhov kev ua kom txias txias? Yog tias yog, ua li cas txog kev tsim ib qho ntawm cov neeg nyiam tshaj plaws thiab txhua tus nyiam cov khoom siv xws li Lub Xov Tooj Txawb !!!. Hauv Cov Lus Qhia no, Kuv yuav qhia koj yuav tsim lub xov tooj txawb yooj yim siv STM li cas
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: 6 Kauj Ruam
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: Cov lus qhia no piav qhia yuav ua li cas thiaj tsim tau Arduino Robot uas tuaj yeem txav mus raws qhov xav tau (Forward, Backward) , Sab laug, Txoj Cai, Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) xav tau Kev nrug deb hauv Centimeters siv lub suab hais kom ua. Neeg hlau kuj tseem tuaj yeem txav tau tus kheej
Siv LCDs ntawm Raspberry Pi: 4 Kauj Ruam
Siv LCDs ntawm Raspberry Pi: Hauv Phau Ntawv Qhia no kuv yuav qhia koj li cas siv 16x2 LCD npo nrog Raspberry Pi siv kuv tus lej tshwj xeeb. Kuv tus lej yog hloov kho tshiab ntawm Matt Hawkins 'LCD server code, uas ua rau nws yooj yim dua xa cov ntawv mus rau lub vijtsam. Txhua yam nws yuav siv: khiav th
8 Relay Tswj Nrog NodeMCU thiab IR Txais Txais Siv WiFi thiab IR Chaw Taws Teeb thiab Android App: 5 Kauj Ruam (nrog Duab)
8 Relay Tswj Nrog NodeMCU thiab IR Txais Txais Siv WiFi thiab IR Chaw Taws Teeb thiab Android App: Tswj 8 qhov hloov pauv hloov siv nodemcu thiab ir tus txais tshaj wifi thiab ir chaw taws teeb thiab hauv app.the ir tej thaj chaw deb ua haujlwm ywj pheej ntawm wifi txuas. NTUJ
Tes Thib Peb ++: Kev Siv Tes Siv Ntau Rau Cov Khoom Siv Hluav Taws Xob thiab Lwm Yam Ua Haujlwm Zoo: 14 Kauj Ruam (nrog Duab)
Tes Thib Peb ++: Kev Siv Tes Siv Ntau Rau Cov Khoom Siv Hluav Taws Xob thiab Lwm Yam Ua Haujlwm Tsis Zoo: Yav dhau los Kuv tau siv tes thib peb/pab txhais tes muaj nyob ntawm cov khw muag khoom hluav taws xob thiab tau poob siab nrog lawv qhov siv tau. Kuv tsis tuaj yeem tau txais cov yeeb yaj kiab raws qhov kuv xav tau lossis nws siv sijhawm ntau dua qhov nws yuav tsum tau teeb tsa