Cov txheej txheem:
- Kauj Ruam 1: Koj Xav Tau Dab Tsi?
- Kauj Ruam 2: Txuas Cov Khoom Txuas
- Kauj Ruam 3: Tsim Cov Ntaub Ntawv Tshiab Hauv Ubidots
- Kauj Ruam 4: Xaiv Raspberry Pi Raws Li Koj Cov Ntaub Ntawv Tshiab
- Kauj Ruam 5: Tsim Ob Qhov Hloov Tshiab
- Kauj Ruam 6:
- Kauj Ruam 7: Coj Nco Ntsoov Koj Tus Kheej ID
- Kauj ruam 8: Ntxiv Widgets rau Koj Dashboard
- Kauj Ruam 9: Xaiv qhov Hloov Widget
- Kauj ruam 10: Tsim Qhov Ntsuas Qhov Ntsuas
- Kauj ruam 11: Ua tiav
- Kauj Ruam 12: Coding Koj Raspberry Pi
- Kauj Ruam 13: Ua kom tiav
Video: Tsim kom muaj Dej Txau Dej Siv Los Siv PiFace thiab Ubidots: 13 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nov yog qhov piv txwv txias uas qhia koj yuav siv Raspberry Pi, PiFace thiab Ubidots los ywg dej koj lub vaj los ntawm qhov deb. Koj tuaj yeem tuaj yeem tswj lub tshuab hluav taws xob nyob deb los ywg dej koj cov nroj tsuag los ntawm txhua qhov chaw, tsuas yog siv koj lub xov tooj.
Kauj Ruam 1: Koj Xav Tau Dab Tsi?
Zoo koj yuav xav tau qee cov ntaub ntawv:
1. Raspberry Pi Qauv B.
2. PiFace Digital
3. Lub Dej Dej - 12V
4. Ib txoj hlua yooj ywm (1Amp)
5. A DC Jack
6. Hwj chim adapter (12V-DC 1000mA)
7. 3/4 PVC xov txuas
8. Teflon daim kab xev
9. Hose
10. Sprinkler
11. Ubidots tus account - lossis - STEM License
Kauj Ruam 2: Txuas Cov Khoom Txuas
1. Txuas PiFace mus rau RaspberryPi yam tsis tau ntsaws rau hauv lub zog txuas.
2. Ua raws li daim duab saum toj no; Cov xaim dawb yog hauv av (GND) thiab nws tau txuas nrog lub davhlau ya nyob twg ntawm kev sib txuas ntawm PiFace, thaum cov hlau liab txuas nrog rau NO tus pin (Ib txwm Qhib).
Nco tseg: Raws li kev sib txuas hydraulic, nco ntsoov siv daim kab xev teflon ntawm txhua lub koomhaum txhawm rau tiv thaiv dej los ntawm xau.
Kauj Ruam 3: Tsim Cov Ntaub Ntawv Tshiab Hauv Ubidots
Yog tias koj tshiab rau Ubidots, mus rau www.ubidots.com thiab tsim tus account. Nkag mus rau "Cov Chaw" tab thiab nyem rau "Ntxiv Cov Ntaub Ntawv Tshiab".
Kauj Ruam 4: Xaiv Raspberry Pi Raws Li Koj Cov Ntaub Ntawv Tshiab
Xaiv Raspberry Pi Icon thiab txuas ntxiv mus
Kauj Ruam 5: Tsim Ob Qhov Hloov Tshiab
Nyem rau ntawm koj cov ntaub ntawv qhov chaw thiab tsim ob qhov hloov pauv tshiab: "valve" thiab "relay_state".
Kauj Ruam 6:
Kauj Ruam 7: Coj Nco Ntsoov Koj Tus Kheej ID
Peb yuav xav tau tus lej ID ntawm qhov hloov pauv rau peb txoj haujlwm Raspberry Pi. Peb tseem yuav xav tau koj tus lej API Key.
Kauj ruam 8: Ntxiv Widgets rau Koj Dashboard
Nyem rau ntawm "Dashboard" tab thiab nyem rau ntawm "Ntxiv widget tshiab"
Kauj Ruam 9: Xaiv qhov Hloov Widget
Xaiv qhov hloov pauv Widget thiab khi nws mus rau qhov sib txawv "valve". Tus widget no yuav sau "1" lossis "0" mus rau "valve" sib txawv, uas peb yuav xaiv tom qab los ntawm peb Raspberry Pi.
Kauj ruam 10: Tsim Qhov Ntsuas Qhov Ntsuas
Tam sim no ntxiv lwm tus widget, xaiv qhov "ntsuas" hom widget thiab xaiv qhov sib txawv "valve_state"
Kauj ruam 11: Ua tiav
Tam sim no peb muaj lub dashboard txias, cia peb txuas ntxiv nrog cov cai.
Kauj Ruam 12: Coding Koj Raspberry Pi
Peb yuav xav tias koj muaj Raspberry Pi ua haujlwm uas txuas nrog Is Taws Nem. Yog tias tsis yog, txheeb xyuas cov ntawv blog no hais txog teeb tsa WiFi hauv Raspberry Pi. Tom qab ntawd nkag mus los ntawm lub davhlau ya nyob twg rau hauv koj li Raspberry Pi thiab teeb tsa SPI module sib tham nrog PiFace Digital:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Ntxiv tus cim "#" ua ntej kab spi-bcm2708, tom qab ntawd nias CTRL-X, ntaus Y thiab Enter. Qhov no ua rau SPI los ntawm khau raj. Tam sim no cia peb teeb tsa thiab teeb tsa PiFace Digital library:
sudo apt-tau hloov tshiabudo apt-tau nruab python3-pifacedigitalio python-pifacedigitalio
Pib dua koj Pi:
sudo rov pib dua
Zoo kawg! peb npaj tau pib coding peb qhov project. Tsim cov ntawv tshiab hu ua "valve.py" (los ntawm kev ntaus "nano valve.py") thiab muab cov lej hauv qab no tso rau hauv:
ntshuam pifacedigitalio #Library rau pifacedigitalio los ntawm ubidots ntshuam ApiClient #Library rau Ubidots
pifacedigital = pifacedigitalio. PiFaceDigital () #Declare piface object sim: api = ApiClient ("1fc7a56bf4b539725ace7a3f4aa623e9e9620612") #Tsis txhob hnov qab tso koj tus kheej Apikey valve = api.get_varable '.get_variable ("53ce95547625420403d81468") #Thov nov koj lub xeev ID tiag tiag tshwj tsis yog: luam tawm ("tsis tuaj yeem txuas") #Txheeb xyuas koj li Apikey, tus lej sib txawv thiab tus lej sib txuas hauv internet (Muaj tseeb): lastValue = valve.get_values (1) #Tau txais tus nqi kawg ntawm lub valve los ntawm Ubidots tso tawm = pifacedigital.relays [0].value #Save relay xeev valveState.save_value ({'tus nqi': tso tawm) #Xa lub xeev xa mus rau Ubidots rau hauv qhov kawgValue: luam tawm ['tus nqi'] yog (a ['tus nqi']): #Qhib lossis tshem tawm qhov txuas pifacedigital.output_pins [0].turn_on () lwm tus: pifacedigital.output_pins [0].turn_off ()
Kauj Ruam 13: Ua kom tiav
Ua tiav! Tam sim no koj muaj lub tshuab ua haujlwm nyob deb los ywg dej koj cov nroj tsuag los ntawm txhua qhov chaw tsuas yog siv koj lub xov tooj lossis ib lub web browser!
Pom zoo:
Dej Ntes Los Siv Arduino thiab Dej Los Dej Sensor: 8 Kauj Ruam
Dej Ntes Dej Siv Arduino thiab Raindrop Sensor: Hauv qhov kev qhia no peb yuav kawm paub yuav txheeb xyuas nag los siv lub ntsuas cua nag thiab ua lub suab siv lub suab nrov nrov thiab OLED Display thiab Visuino. Saib cov vis dis aus
Tsim kom muaj DIY Tus Kheej Dej Dej Nrog WiFi - Dej Tsob Ntoo Tuaj thiab Xa Kev Ceeb Toom Thaum Dej Tsawg: 19 Kauj Ruam
Ua DIY Tus Kheej Tus Kheej Dej Nrog WiFi - Dej Tsob Ntoo Tuaj thiab Xa Kev Ceeb Toom Thaum Dej Tsis Tshua: Cov ntawv qhia no qhia koj yuav tsim kho li cas Wi -nkaus txuas nrog tus kheej cog cog dej siv lub qub vaj cog, cov thoob khib nyiab, qee cov nplaum thiab tus kheej Watering Pot Subassembly Kit los ntawm Adosia
Tsim kom muaj Hygrometer hauv Tsev Siv Raspberry Pi thiab SI7021: 6 Cov Kauj Ruam
Tsim kom muaj Hygrometer hauv Tsev Siv Raspberry Pi thiab SI7021: Puas yog nws ntub li niaj hnub no? Nws zoo li me ntsis ntub rau kuv. Qee lub sij hawm rau peb, cov av noo siab ua pov thawj tias tsis xis nyob thiab tsis zoo. Rau tsev neeg, nws tuaj yeem ua rau muaj kev puas tsuaj ib yam nkaus. Rau lub tsev, cov av noo ntau ua rau cov ntoo hauv tsev puas thiab cov khoom siv
Tsim kom muaj Amateur Xov Tooj Cua APRS RX Tsuas Yog IGate Siv Raspberry Pi thiab RTL-SDR Dongle Hauv Tsawg Ib Nrab Sijhawm: 5 Kauj Ruam
Tsim kom muaj Amateur Radio APRS RX Tsuas yog IGate Siv Raspberry Pi thiab RTL-SDR Dongle hauv Tsawg Ib Nrab Ntawm Ib Teev Sijhawm: Thov nco ntsoov tias tam sim no nws qub dhau lawm yog li qee qhov tsis raug thiab tsis tiav. Cov ntaub ntawv koj xav tau los hloov pauv. Kuv tau hloov kho qhov txuas los muab qhov hloov tshiab ntawm koj daim duab (thov siv 7-zip kom decompress nws) tab sis rau kev qhia tag nrho
Tsim kom muaj suab paj nruag tsis xwm yeem thiab lub teeb tsim hluav taws xob thiab pom qhov pov thawj ntawm Vajtswv: 4 Cov Kauj Ruam
Tsim kom muaj Kev Nyuaj Siab Suab Nkauj thiab Lub Teeb Hluav Taws Xob thiab Nyeem Ntawv Pov Thawj ntawm Vajtswv: Tsim cov lej tsis raug zoo zoo li tsis yooj yim sua. Txawm li cas los xij, nws yooj yim siv microcontroller los tsim cov lej tsis raug thiab tom qab ntawd siv lawv los tso saib cov suab thiab cov xim sib txawv. Thaum cov nkauj uas tau tsim tawm yog n