Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Teeb Koj Raspberry Pi
- Kauj Ruam 2: Ntsuas Koj Lub Teeb thiab Qhov Kub Kub
- Kauj Ruam 3: Txhim Kho Koj Li Circuit Court
- Kauj ruam 4: Code
- Kauj ruam 5: Troubleshooting
Video: Nyeem thiab Teeb Duab Lub Teeb thiab Kub Sensor Cov Ntaub Ntawv Nrog Raspberry Pi: 5 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Hauv Cov Lus Qhia no koj yuav kawm paub nyeem lub teeb thiab ntsuas kub li cas nrog raspberry pi thiab ADS1115 analog rau cov hloov pauv thiab teeb duab nws siv matplotlib. Cia pib nrog cov ntaub ntawv xav tau.
Khoom siv
- Raspberry pi (ib tus twg yuav ua, txawm hais tias kuv tab tom siv 4)
- MicroSD daim npav nrog Raspbian teeb tsa (nyeem tau zoo:
- HDMI saib thiab lub zog siv
- Micro USB kab
- Adafruit ADS 1115 analog to digital converter:
- Jumper xov hlau
- lub teeb pom kev zoo (LDR)
- kub sensor
- potentiometer x2 (tus nqi yuav yog qhov nruab nrab ntawm qhov ntau ntawm qhov tsis kam ntawm koj lub ntsuas cua thiab lub teeb, uas peb yuav ntsuas tom qab)
- Cov qhob cij
Kauj Ruam 1: Teeb Koj Raspberry Pi
1. Ua raws cov ntawv qhia no kom teeb tsa koj li raspberry pi: https://www.raspberrypi.org/help/noobs-setup/2/2. Pab kom I2C: nyem lub cim raspberry pi nyob rau sab saud. Mus rau qhov nyiam> raspberry pi teeb tsa> cuam tshuam> thiab khij lub npov "pab" ntawm I2C. Tom qab ntawv nyem OK. 3. Tam sim no qhib lub davhlau ya nyob twg qhov rai. Ntawm kab hais kom ua hom:
sudo apt-tau hloov tshiab
sudo pip3 nruab adafruit-circuitpython-ads1x15
sudo apt-tau nruab python-matplotlib
Kauj Ruam 2: Ntsuas Koj Lub Teeb thiab Qhov Kub Kub
Tam sim no peb yuav tsum tau ntsuas lub teeb thiab qhov ntsuas kub tsis kam. Siv lub ntsuas hluav taws xob ntsuas ntawm qhov ntsuas qhov ntsuas tsis zoo thiab ntsuas hla txoj hauv kev ntawm koj lub teeb pom kev hauv qhov pom kev thiab tsaus ntuj. Sau cov txiaj ntsig. Tam sim no coj koj lub ntsuas hluav taws xob ntawm qhov ntsuas ntawm koj qhov ntsuas kub hauv qhov kub thiab txias (Kuv tau siv dej). Sau cov txiaj ntsig. Peb yuav siv lawv tom qab hauv peb qhov kev sib tham.
Kauj Ruam 3: Txhim Kho Koj Li Circuit Court
1. Sau cov ntaub ntawv teev tseg hauv cov npe khoom siv. Rau lub zog ntsuas, siv tus nqi uas yog qhov nruab nrab ntawm qhov siab thiab qis (lub teeb thiab tsaus, kub thiab txias).
(siab-qis) / 2
2. Ua raws daim duab qhia chaw saum toj no:
- Txuas SDA ntawm qhov sib piv rau digital hloov mus rau SDA ntawm tus pi
- Txuas SCL ntawm qhov sib piv rau digital hloov mus rau SCL ntawm tus pi
- Txuas VDD ntawm qhov sib piv rau digital hloov mus rau 3.3v ntawm tus pi
- Txuas GND ntawm qhov sib piv rau digital hloov pauv mus rau hauv av ntawm pi
- Txuas cov khoom seem raws li daim duab qhia chaw.
Kauj ruam 4: Code
1. Ntaus hauv lub davhlau ya nyob twg:
nano cov digital.py
2. Muab tshuaj txhuam tus lej kuv muaj hauv qab no lossis ntawm Github rau hauv cov ntawv sau uas yuav tsum tshwm sim.
ntshuam matplotlib.pyplot li plt
import numpy as np import board import busio import time import adafruit_ads1x15.ads1115 as ADS from adafruit_ads1x15.analog_in import AnalogIn i2c = busio. I2C (board. SCL, board. SDA) tawm = ADS. ADS1115 (i2c) x = 0 teeb = AnalogIn (tawm, ADS. P0) temp = AnalogIn (tawm, ADS. P1) X1 = X2 = Y1 = Y2 = plt.ylim (-50, 1000) plt.plot (X1, Y1, label = "light", color = '#0069af') plt.plot (X2, Y2, label = "Temp", color = '#ff8000') plt.xlabel ('Sijhawm (feeb)') plt.ylabel (' Theem ') plt.title (' Lub teeb thiab kub dhau sijhawm ') plt.legend () thaum Tseeb: x += 5 Y1.append (lub teeb.value/30) X1.append (x) Y2.append (temp.value /3) X2.append (x) plt.plot (X1, Y1, label = "light", color = '#0069af') plt.plot (X2, Y2, label = "Temp", color = '#ff8000') plt.pause (300)
3. Tam sim no nias CTRL+X kom tawm, nias y kom txuag, tom qab ntawd nias nkag mus.
Khiav koj qhov program los ntawm kev ntaus hauv lub davhlau ya nyob twg:
sudo python3 digital.py
4. Kho cov potentiometers kom cov duab qhia ntau yam ntawm cov txiaj ntsig. Sim ua lub teeb ci ntawm lub ntsuas hluav taws xob thiab tua lub teeb hauv chav kom ntseeg tau tias kab teeb qhia ntau yam txiaj ntsig.
Yog tias ib qho ntawm cov txiaj ntsig poob qis hauv qab, sim txo qhov sib faib sib xws (kab 29 thiab 31).
Yog tias ib qho ntawm cov txiaj ntsig mus saum toj saud, sim ua kom sib npaug sib npaug (kab 29 thiab 31).
Kauj ruam 5: Troubleshooting
1. Muab ob npaug rau xyuas txhua qhov kev sib txuas tiv thaiv kab kos duab
2. I2C kuaj pom - Yuav qhia koj txhua lub cuab yeej txuas nrog los ntawm i2c:
Hom hauv davhlau ya nyob twg:
sudo apt-tau nruab i2c-cuab yeej
sudo i2cdetect - y 1
Pom zoo:
Cheeb Tsam Impedance Siv Cov Lej Nyeem Nyeem Nyeem Ntawv: 6 Kauj Ruam
Cheeb Tsam Impedance Siv Cov Zauv Ua Ntej: Nov yog daim ntawv thov siv ntawm cov lej ua lej sib luag.Qhov no yog qhov tseeb cov txheej txheem muaj txiaj ntsig zoo uas koj tuaj yeem siv los qhia tus yam ntxwv, lossis txawm tias lub kav hlau txais xov, ntawm qhov ua ntej ua ntej yog tias koj tau tinkering nrog hluav taws xob koj tej zaum yog fam
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
ScanUp NFC nyeem ntawv/sau ntawv thiab kaw lub suab rau qhov muag tsis pom, tsis pom kev thiab txhua tus neeg ntxiv: 4 Cov Kauj Ruam (nrog Duab)
ScanUp NFC Nyeem Ntawv/sau ntawv thiab kaw lub suab rau qhov muag tsis pom, Tsis pom kev thiab txhua tus neeg ntxiv: Kuv kawm kev tsim qauv tsim thiab txoj haujlwm yog ua haujlwm ntawm kuv lub semester. Lub hom phiaj yog txhawb nqa cov neeg tsis pom kev thiab cov neeg dig muag nrog cov khoom siv, uas tso cai sau cov suab hauv WAV hom ntawm SD daim npav thiab hu cov ntaub ntawv ntawd los ntawm NFC lossis. Yog li hauv
RAWS LI COV NTAUB NTAWV NTSEEG NTAWV NTAWV MUAJ NTAWV TSHUAJ NTAWV TSO CAI RAU RASPBERRY PI: 6 Kauj Ruam (nrog Duab)
RAWS LI COV NTAUB NTAWV NTAWV MUAJ NTAWV TSHUAJ NTXIV RAU RASPBERRY PI: Hauv qhov haujlwm no, peb yuav txuas peb ntawm Atlas Scientific's EZO sensors (pH, yaj cov pa thiab kub) mus rau Raspberry Pi 3B+. Hloov chaw ntawm txuas cov kab hluav taws xob mus rau Raspberry Pi, peb yuav siv Whitebox Labs Tentacle T3 daim ntaub thaiv. T
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: 13 Kauj Ruam (nrog Duab)
Kub thiab Vaum Zaub thiab Sau Cov Ntaub Ntawv Nrog Arduino thiab Ua: Intro: Qhov no yog Txoj Haujlwm uas siv Arduino board, Sensor (DHT11), lub khoos phis tawj Windows thiab Kev Ua Haujlwm (rub tawm dawb) program los tso saib Kub, Cov ntaub ntawv vaum hauv digital thiab bar kab ntawv, tso tawm lub sijhawm thiab hnub tim thiab suav lub sijhawm suav