Cov txheej txheem:
- Kauj Ruam 1: Software - Energia IDE, PyCharm
- Kauj Ruam 2: Kho vajtse - MSP432 LaunchPad, Kev Kawm BoosterPack MKII
- Kauj Ruam 3: Energia IDE
- Kauj Ruam 4: Xaiv Qhov Tsim Nyog COM Port thiab Board
- Kauj Ruam 5: Energia Los Ua Ntej Ua Ntej Nrog Tus Qauv Piv Txwv rau TMP006
- Kauj Ruam 6: Tshaj Tawm Cov Kev Pab Hauv Qab no mus rau LaunchPad los ntawm Nyem rau ntawm Upload khawm
- Kauj ruam 7: PyCharm
- Kauj Ruam 8: Txoj Haujlwm Python
- Kauj ruam 9: Daim phiaj kawg
Video: Plotting Live Cov Ntaub Ntawv ntawm Qhov Kub Kub Sensor (TMP006) Siv MSP432 LaunchPad thiab Python: 9 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
TMP006 yog qhov ntsuas kub uas ntsuas qhov kub ntawm ib yam khoom yam tsis tas yuav ua kom muaj kev sib cuag nrog cov khoom. Hauv qhov kev qhia no peb yuav npaj cov ntaub ntawv ntsuas kub nyob ntawm BoosterPack (TI BOOSTXL-EDUMKII) siv Python.
Kauj Ruam 1: Software - Energia IDE, PyCharm
Energia IDE:
Kauj Ruam 2: Kho vajtse - MSP432 LaunchPad, Kev Kawm BoosterPack MKII
Kauj Ruam 3: Energia IDE
Txuas MSP432 LaunchPad + Kev Kawm BoosterPack rau ib qho ntawm koj lub computer USB chaw nres nkoj thiab qhib Energia IDE.
Kauj Ruam 4: Xaiv Qhov Tsim Nyog COM Port thiab Board
Kauj Ruam 5: Energia Los Ua Ntej Ua Ntej Nrog Tus Qauv Piv Txwv rau TMP006
Tus qauv piv txwv tuaj yeem qhib raws li qhia hauv daim duab.
Kauj Ruam 6: Tshaj Tawm Cov Kev Pab Hauv Qab no mus rau LaunchPad los ntawm Nyem rau ntawm Upload khawm
#include #include "Adafruit_TMP006.h" #define USE_USCI_B1 Adafruit_TMP006 tmp006; void printFloat (tus nqi ntab, qhov chaw nyob); tsis muaj teeb tsa () {Serial.begin (115200); // Initalizes TMP006 rau kev ua haujlwm thiab rau I2C kev sib txuas lus yog (! Tmp006.begin (TMP006_CFG_8SAMPLE)) {Serial.println ("Tsis pom lub sensor"); thaum (1); }} void loop () {float objt = tmp006.readObjTempC (); ntab noj zaub mov = tmp006.readDieTempC (); Serial.print (objt); // Lub Hom Phiaj Kub Serial.print (" -"); Serial.println (kev noj haus); // Tuag Kub ncua (1000); }
Kauj ruam 7: PyCharm
Ua ntej khiav qhov haujlwm hauv qab no, xyuas kom tseeb tias cov pob khoom, pySerial thiab Matplotlib tau teeb tsa. PySerial yog Python lub tsev qiv ntawv uas muab kev txhawb nqa rau kev sib txuas txuas nrog ntau yam khoom siv sib txawv. Matplotlib yog lub tsev qiv ntawv npaj rau Python. To nruab ib lub pob hauv PyCharm, ua raws cov theem hauv qab no: 1. Cov Ntaub Ntawv -> Chaw. 2. Hauv Txoj Haujlwm, xaiv Txoj Haujlwm Txhais Lus thiab nyem rau ntawm lub cim "+" 3. Hauv kab ntawv tshawb nrhiav, ntaus pob koj xav nruab thiab nyem rau ntawm Install Package.
Kauj Ruam 8: Txoj Haujlwm Python
ntshuam ntshuam ntshuam ntshuam matplotlib.pyplot li pltplt.style.use ("seaborn") Hom kev sib tham kuj tseem tuaj yeem qhib ntawm matplotlib.pyplot.ion (), thiab kaw ntawm matplotlib.pyplot.ioff (). '' 'plt.ion () msp432 = serial. Serial (' COM4 ', 115200) #(tus lej chaw nres nkoj, baudrate) - tsim cov khoom sib txuas i = 0 x0 = y1 = y2 = thaum Muaj tseeb: msp432Serial = msp432.readline () tempArray = msp432Serial.split (b '-') objTemp = ntab (tempArray [0]) dieTemp = float (tempArray [1]) x0.append (i) y1.append (objTemp) y2.append (dieTemp) i += 1 plt.xlim (sab laug = max (0, i-20), txoj cai = i +10) #teeb tsa x-txwv ntawm cov kab tam sim no plt.ylim (20, 40) #set y-txwv ntawm cov kab tam sim no plt.ylabel ('Kub (C)', fontname = 'Comic Sans MS', xim = 'xiav', fontsize = 14) #teeb daim ntawv lo rau y-axis plt.grid (Muaj tseeb) #turn daim phiaj ntawm plt.title ('TMP006 Cov Ntaub Ntawv Nyob', fontname = 'Comic Sans MS', xim = 'liab', fontsize = 16) #teeb lub npe p1, = plt.plot (x0, y1, color = 'r', linewidth = 2) #plot x0 versus y1 - red line p2, = plt.plot (x0, y2, color = 'g', linewidth = 2) #plot x0 versus y2 - kab ntsuab plt.legend ([p1, p2], ['Object Temperature', 'Die Temperature'], loc = 'upper right', frameon = True) #tso cov lus dab neeg nyob rau sab xis saum toj ntawm e daim duab plt.show () #display daim duab plt.pause (.000001) #ncua rau ntu thib ob
Kauj ruam 9: Daim phiaj kawg
Lub Hom Phiaj Kub: Nws yog qhov kub ntawm cov nti ib puag ncig. Qhov Kub: Nws yog qhov kub ntawm cov nti nws tus kheej. -Scale Pob: https://www.ti.com/ww/eu/sensampbook/tmp006.pdfMatplotlib: https://matplotlib.org/pySerial: https://pyserial.readthedocs.io/en/latest/shortintro. html
Pom zoo:
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): 3 Cov Kauj Ruam
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): Peb txhua tus nyiam ua si nrog peb tus lej L … cov ntsiab lus tau ntxiv thiab nws tsis tshwj xeeb rau lub qhov muag. Arduino IDE cov phiaj xwm tsis
Xa Cov Ntaub Ntawv Los Ntawm Arduino mus rau Excel (thiab Plotting Nws): 3 Cov Kauj Ruam (nrog Duab)
Xa Cov Ntaub Ntawv Los Ntawm Arduino mus rau Excel (thiab Plotting Nws): Kuv tau tshawb nrhiav ntau ntxiv rau txoj hauv kev uas kuv tuaj yeem npaj kuv li Arduino sensor nyeem hauv lub sijhawm. Tsis tsuas yog cov phiaj xwm, tab sis kuj tseem tso tawm thiab khaws cov ntaub ntawv rau kev sim ntxiv thiab kho qhov yooj yim tshaj plaws uas kuv tau pom yog siv excel, tab sis nrog
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
Xa Cov Ntaub Ntawv ntawm Kev Ruaj Ntseg Wireless thiab Kub rau Google Cov Ntawv Siv Node-RED: 37 Cov Kauj Ruam
Xa Cov Ntaub Ntawv ntawm Kev Ruaj Ntseg Ruaj Ntseg thiab Qhov Kub Kub rau Google Cov Ntawv Siv Node-RED: Qhia NCD's Long Range IoT Muaj wireless tsis muaj kev co thiab ntsuas kub, khav txog li 2-mais kev siv lub wireless mesh networking qauv. Koom nrog qhov tseeb 16-ntsis kev co thiab ntsuas kub, cov cuab yeej siv no
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 - Saib Xyuas Qhov Kub Kub & Qhov Kub Kub ntawm M5stick-C Nrog DHT11: 6 Cov Kauj Ruam
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 | Saib Xyuas Qhov Kub thiab Qhov Ntsuas Kub ntawm M5stick-C Nrog DHT11: Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab tso tawm ntawm cov zaub ntawm m5stick-C. Yog li hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & heat kuv