Cov txheej txheem:
- Kauj Ruam 1: Kev Txhim Kho Software
- Kauj ruam 2: Kev thaiv kab
- Kauj Ruam 3: Arduino Code
- Kauj Ruam 4: Python_2.7 Code
Video: Arduino thiab Python Serial Communication - Keypad Display: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Txoj Haujlwm no tau ua rau cov neeg siv mac tab sis nws kuj tseem tuaj yeem siv rau Linux thiab Windows, tsuas yog cov kauj ruam uas yuav tsum sib txawv yog kev teeb tsa.
Kauj Ruam 1: Kev Txhim Kho Software
- Rub tawm thiab Nruab Arduino ->
- Rub tawm thiab Nruab Python 2.7 ->
- Rub tawm lub tsev qiv ntawv Python "pyserial -2.7.tar.gz" ->
- Rub tawm pyserial-2.7.tar.gz
- Qhib Terminal thiab ntaus:
cd /users/"Your-User-Account"/Downloads/pyserial-2.7
sudo python setup.py nruab
Kev teeb tsa software npaj txhij!
Kauj ruam 2: Kev thaiv kab
- Arduino Ib
- Sparkfun 12 Button keypad
Cov xov hluav taws xob tau ua tiav yam tsis muaj tus tiv thaiv sab nraud, hloov kuv siv sab hauv Rub-Resistors ntawm lub microcontroller (sab hauv Pullup-Resistors ntawm Arduino muaj tus nqi 20K-Ohm txog 50K-Ohm)
Txhawm rau qhib sab hauv Rub-Resistors teeb tsa INPUT-Pins HIGH hauv cov cai
Yog tias koj siv lwm tus Keypad saib ntawm cov ntaub ntawv rau txoj cai thaiv, txwv tsis pub nws tuaj yeem ua rau koj lub microcontroller puas
Kauj Ruam 3: Arduino Code
- Ua ntej peb txhais lub cim-Matrix rau Cov Yuam Sij
- Cov keypad siv cov hloov pauv ib txwm uas tau teeb tsa hauv 4 kab (Pins 7, 2, 3 thiab 5) thiab 3 kab (Pins 6, 8 thiab 4), tau txhais ua Arrays rowPins thiab colPins
-
Kev teeb tsa () muaj nuj nqi
- Qhib lub qhov rooj txuas nrog Serial.begin ();
- Teeb kab ua OUTPUT-Pins HIGH
- Qhib cov Pullup-Resistors, los ua cov kab no ua INPUT-Pins HIGH;
-
Getkey () muaj nuj nqi
- Teem txhua kab LOW thiab ntsuas yog tias ib ntawm kab yog LOW. Vim tias Pullup-Resistors yog txhua kab HIGH kom txog thaum tus yuam sij raug thawb. Tus yuam sij thawb tsim LOW-Signal ntawm INPUT-Pin. Qhov LOW no qhia tus yuam sij hauv kab no thiab kab lus
- Tos kom txog thaum tus yuam sij raug tso tawm thiab xa rov qab tus lej ntawm tus keymap-Array lossis 0 yog tias tsis muaj tus yuam sij raug thawb
- Siv ncua sijhawm (debounceTime) los tswj lub teeb liab
Kauj Ruam 4: Python_2.7 Code
- Ntshuam Serial Library
- Txhais qhov sib txawv sib txawv = FALSE, tom qab yog qhov sib txawv no siv los ntsuas yog tias muaj kev txuas txuas lossis tsis muaj
-
Qhib Serial Port nrog serial. Serial ("Lub npe ntawm koj li Serial Port", baud)
- Txhawm rau kom tau lub npe ntawm koj qhov chaw nres nkoj nyem nyem -> Cov Cuab Yeej/Serial Port hauv Arduino IDLE
- baud yuav tsum zoo ib yam li hauv Arduino Code
- Hauv lub sijhawm ntsuas lub voj yog tias muaj qhov txuas lossis tsis tau nyeem lub teeb liab thiab teeb tsa qhov sib txawv sib txuas = TRUE, nws loops kom txog thaum nws tau txais kev txuas txuas
- Tom qab kev sib txuas tau nyeem cov ntawv xov xwm nyob rau hauv ib pliag lub voj thiab muab cov lus nkag rau hauv qhov hloov pauv tshiab "var"
- kaw qhov chaw nres nkoj nrog ser.close ()
Pom zoo:
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card - DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: 5 Cov Kauj Ruam
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card | DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: Taw qhia: nyob zoo, qhov no yog Liono Maker, ntawm no yog YouTube txuas. Peb tab tom tsim txoj haujlwm muaj tswv yim nrog Arduino thiab ua haujlwm ntawm cov kab ke. Cov ntaub ntawv-Logger: Cov ntaub ntawv logger (tseem cov ntaub ntawv-logger lossis cov ntaub ntawv kaw) yog cov cuab yeej siv hluav taws xob uas sau cov ntaub ntawv dhau sijhawm
Yuav Tsim Li Cas thiab Ntxig Ib Lub Rooj Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: 11 Cov Kauj Ruam
Yuav Tsim Li Cas thiab Ntxig Cov Lus Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: Koj puas tau muaj cov ntaub ntawv ntau uas koj ua haujlwm nrog thiab xav rau koj tus kheej … " Kuv yuav ua li cas ntawm cov ntaub ntawv no saib zoo dua thiab nkag siab yooj yim dua? " Yog tias yog, tom qab ntawd lub rooj hauv Microsoft Office Word 2007 yuav yog koj cov lus teb
PIC MCU thiab Python Serial Communication: 5 Kauj Ruam
PIC MCU thiab Python Serial Communication: Nyob zoo, cov phooj ywg! Hauv txoj haujlwm no kuv yuav sim piav qhia kuv qhov kev sim ntawm PIC MCU thiab Python kev sib txuas lus txuas. Hauv is taws nem, muaj ntau yam kev qhia thiab yeeb yaj kiab yuav ua li cas sib txuas lus nrog PIC MCU hla lub davhlau ya nyob twg uas muaj txiaj ntsig zoo. Howev
Nkag Mus Cov Ntaub Ntawv thiab Npaj Cov Duab Online Siv NodeMCU, MySQL, PHP thiab Chartjs.org: 4 Cov Kauj Ruam
Nkag Mus Cov Ntaub Ntawv thiab Npaj Cov Duab Online Siv NodeMCU, MySQL, PHP thiab Chartjs.org: Cov lus qhia no piav qhia yuav ua li cas peb tuaj yeem siv Node MCU pawg thawj coj los sau cov ntaub ntawv los ntawm ntau lub ntsuas, xa cov ntaub ntawv no mus rau tus tswv PHP cov ntaub ntawv uas tom qab ntawd ntxiv cov ntaub ntawv rau MySQL database. Cov ntaub ntawv tuaj yeem pom online hauv kab ntawv, siv chart.js.A ba
Cov Cuab Yeej Siv Hluav Taws Xob thiab Cov Cuam Tshuam Xov: Ua LED Zaub thiab Npuag Hluav Taws Xob uas Rolls Up: 7 Cov Kauj Ruam (nrog Duab)
Cov Cuab Yeej Siv Hluav Taws Xob thiab Cov Cuam Tshuam: Ua kom pom LED thiab Cov Khoom Siv Hluav Taws Xob uas Rolls Up: Ua rau koj tus kheej cov ntaub ua hluav taws xob, xov, kua nplaum, thiab kab xev, thiab siv lawv los ua lub zog ntsuas hluav taws xob, tiv thaiv, hloov pauv, LED cov lus qhia thiab siv hluav taws xob. thiab cov xov hluav taws xob koj tuaj yeem ua cov lus qhia LED thiab cov kab hluav taws xob ntawm ib qho ntaub uas hloov pauv tau