Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Xav Tau..
- Kauj Ruam 2: Kev Sib Txuas:
- Kauj ruam 3: Code:
- Kauj Ruam 4: Cov ntawv thov:
Video: Raspberry Pi CPS120 Siab Sensor Java Qhia: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
CPS120 yog qhov ua tau zoo thiab tus nqi qis capacitive tsis siab sensor nrog kev them nyiaj tag nrho. Nws siv hluav taws xob tsawg heev thiab suav nrog ib qho me me me me Micro-Electro-Mechanical Sensor (MEMS) rau ntsuas ntsuas. Sigma-delta raws ADC kuj tseem muaj nyob hauv nws kom ua tiav qhov xav tau ntawm cov nyiaj them poob haujlwm. Nov yog qhov ua piv txwv nrog java code siv Raspberry Pi.
Kauj Ruam 1: Yam Koj Xav Tau..
1. Raspberry Pi
2. CPS120
3. I²C Cable
4. I²C Shield rau Raspberry Pi
5. Ethernet Cable
Kauj Ruam 2: Kev Sib Txuas:
Siv daim I2C daim thaiv rau raspberry pi thiab maj mam thawb nws hla gpio pins ntawm raspberry pi.
Tom qab ntawd txuas ib qho kawg ntawm I2C cable rau CPS120 sensor thiab lwm qhov kawg rau I2C daim ntaub thaiv.
Kuj txuas Ethernet cable rau pi lossis koj tuaj yeem siv WiFi module.
Kev sib txuas tau qhia hauv daim duab saum toj no.
Kauj ruam 3: Code:
Tus lej java rau CPS120 tuaj yeem rub tawm los ntawm peb qhov chaw cia khoom github- Dcube Store
Nov yog qhov txuas rau tib yam:
github.com/DcubeTechVentures/CPS120/blob/master/Java/CPS120.java
Peb tau siv pi4j tsev qiv ntawv rau java code, cov kauj ruam rau nruab pi4j ntawm raspberry pi tau piav qhia ntawm no:
pi4j.com/install.html
Koj tseem tuaj yeem luam cov cai los ntawm no, nws tau muab raws li hauv qab no:
// Faib nrog daim ntawv tso cai yuav dawb.
// Siv nws txhua txoj hauv kev uas koj xav tau, muaj txiaj ntsig lossis pub dawb, muab nws haum rau hauv daim ntawv tso cai ntawm nws cov haujlwm ua haujlwm.
CPS120
// Cov cai no tau tsim los ua haujlwm nrog CPS120_I2CS I2C Mini Module.
ntshuam com.pi4j.io.i2c. I2CBus;
ntshuam com.pi4j.io.i2c. I2CDevice;
ntshuam com.pi4j.io.i2c. I2CFactory;
ntshuam java.io. IOException;
pej xeem chav kawm CPS120
{
pej xeem zoo li qub tsis muaj dab tsi tseem ceeb (Txoj hlua args ) cuam tshuam zam
{
// Tsim I2CBus
I2CBus tsheb npav = I2CFactory.getInstance (I2CBus. BUS_1);
// Tau txais I2C ntaus ntawv, CPS120 I2C chaw nyob yog 0x28 (40)
I2CDevice ntaus ntawv = bus.getDevice (0x28);
// Xa cov lus txib pib
device.write (0x28, (byte) 0x80);
Xov.sleep (800);
// Nyeem 2 bytes ntawm cov ntaub ntawv, msb ua ntej
byte cov ntaub ntawv = tshiab byte [2];
device.read (cov ntaub ntawv, 0, 2);
// Hloov cov ntaub ntawv rau kPa
ob npaug siab = (((cov ntaub ntawv [0] & 0x3F) * 256 + cov ntaub ntawv [1]) * (90 / 16384.00)) + 30;
// Cov ntaub ntawv tso tawm rau lub vijtsam
System.out.printf ("Siab yog: %.2f kPa %n", siab);
}
}
Kauj Ruam 4: Cov ntawv thov:
CPS120 muaj ntau yam kev siv. Nws tuaj yeem ua haujlwm nyob rau hauv nqa tau thiab ntsuas barometers, qhov siab thiab lwm yam Kev ntsuas siab yog qhov ntsuas tseem ceeb los txiav txim siab huab cua thiab txiav txim siab tias lub ntsuas no tuaj yeem teeb tsa ntawm cov chaw huab cua ib yam. Nws tuaj yeem suav nrog hauv cov tshuab huab cua nrog rau lub tshuab nqus tsev.
Pom zoo:
Kev Ntsuas Siab Siv CPS120 thiab Raspberry Pi: 4 Cov Kauj Ruam
Kev Ntsuas Siab Siv CPS120 thiab Raspberry Pi: CPS120 yog qhov ua tau zoo thiab tus nqi qis uas muaj peev xwm ua tau siab tshaj qhov ntsuas nrog rau cov txiaj ntsig tau them tag nrho. Nws siv hluav taws xob tsawg heev thiab suav nrog ib qho me me me me Micro-Electro-Mechanical Sensor (MEMS) rau ntsuas ntsuas. Sigma-delta raws
Qhov siab, Siab thiab Kub Siv Raspberry Pi Nrog MPL3115A2: 6 Cov Kauj Ruam
Qhov siab, Siab thiab Kub Siv Raspberry Pi Nrog MPL3115A2: Suab nrov. Nws muaj peev xwm ua tau nyob rau lub sijhawm no thaum peb txhua tus tab tom mus rau IoT tiam. Raws li cov khoom siv hluav taws xob tsis zoo, peb tau ua si nrog Raspberry Pi, thiab txiav txim siab los ua cov phiaj xwm nthuav dav siv qhov kev paub no. Hauv qhov haujlwm no, peb xav tau
Yuav Ua Li Cas Nyeem MPX5010 Qhov Sib Txawv Siab Siab Sensor Nrog Arduino: 5 Kauj Ruam
Yuav Ua Li Cas Nyeem MPX5010 Qhov Sib Txawv Siab Siab Nrog Arduino: Txoj kev uas kuv tau sau cov cai yog qhov uas nws tuaj yeem hloov pauv tau yooj yim kom haum rau lub siab sib txawv. Tsuas yog hloov qhov hloov pauv hauv qab no hauv cov cai raws li qhov muaj txiaj ntsig los ntawm cov ntaub ntawv rau txhua qhov ntsuas siab: " sensorOffset & quot
Kuv Me Me Whoop: Daim Ntawv Qhia Whoop + Cov Lus Qhia thiab Cov Lus Qhia: 8 Kauj Ruam
Kuv Me Me Whoop: Daim Ntawv Qhia Whoop + Cov Lus Qhia thiab Cov Lus Qhia: Kev Ceeb Toom: Tam sim no koj tab tom nkag mus rau kuv thawj qhov kev qhia, thiab koj yuav ntsib ntau yam kev ruam thiab tsis muaj phiaj xwm thiab/lossis txuj ci. Paub txog qhov no yog kuv tus kheej Tiny Whoop teeb tsa uas kuv siv txhua hnub, yog li kuv xav tias kuv yuav qhia nws. Nws yog phooj ywg mus ncig (tsis muaj
Yuav Ua Li Cas Ua Tus Qhia Qhia thiab Qhia: 8 Kauj Ruam
Yuav Ua Li Cas Nthuav Qhia Qhia thiab Qhia: Nov yog phau ntawv qhia rau kev ua Qhia Qhia thiab Qhia. Nws yog qhov tseem ceeb tshaj plaws ntawm cov xwm txheej muaj nyob rau Hnub Friday, Peb Hlis 9, 2007, tab sis kuj tseem yog qhov tshwm sim yav dhau los ntawm qhov xwm txheej no, Squid Labs Lub Teeb Pom Kev Zoo. Lub hom phiaj ntawm Kev Qhia thiab Xov Tooj