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 - HIH6130 I2C Vaum & Kub Sensor Java Qhia: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
HIH6130 yog qhov ntsuas cua thiab ntsuas kub nrog cov zis digital. Cov ntsuas no muab qib raug ntawm ± 4% RH. Nrog kev lag luam-ua kom muaj kev ruaj ntseg mus sij hawm ntev, qhov tseeb kub-them nyiaj digital I2C, Kev lag luam ua rau muaj kev ntseeg siab, Kev siv hluav taws xob zoo thiab Ultra-pob me me qhov loj me thiab xaiv. Nov yog nws qhov ua piv txwv nrog raspberry pi siv java code.
Kauj Ruam 1: Yam Koj Xav Tau..
1. Raspberryy Pi
2. HIH6130
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 HIH6130 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 HIH6130 tuaj yeem rub tawm los ntawm peb GitHub chaw cia khoom- Dcube Store
Nov yog qhov txuas rau tib yam:
github.com/DcubeTechVentures/HIH6130…
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.
TIAB SA 6130
// Cov cai no tau tsim los ua haujlwm nrog HIH6130_I2CS I2C Mini Module muaj nyob hauv Dcube Store.
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 HIH6130
{
pej xeem zoo li qub tsis muaj dab tsi tseem ceeb (Txoj hlua args ) cuam tshuam zam
{
// Tsim I2C npav
I2CBus Bus = I2CFactory.getInstance (I2CBus. BUS_1);
// Tau txais I2C ntaus ntawv, HIH6130 I2C chaw nyob yog 0x27 (39)
I2CDevice ntaus ntawv = Bus.getDevice (0x27);
Xov.sleep (500);
// Nyeem 4 bytes ntawm cov ntaub ntawv
// humidity msb, humidity lsb, temp msb, temp lsb
byte cov ntaub ntawv = tshiab byte [4];
device.read (0x00, cov ntaub ntawv, 0, 4);
// Hloov cov ntaub ntawv mus rau 14-ntsis
ob npaug av noo = (((data [0] & 0x3F) * 256) + (data [1] & 0xFF)) / 16384.0 * 100.0;
int temp = (((cov ntaub ntawv [2] & 0xFF) * 256) + (data [3] & 0xFC)) / 4);
ob cTemp = (temp / 16384.0) * 165.0 - 40.0;
ob fTemp = cTemp * 1.8 + 32;
// Cov ntaub ntawv tso tawm rau lub vijtsam
System.out.printf ("Tus txheeb ze Vaum: %.2f %% RH %n", av noo);
System.out.printf ("Kub hauv Celsius: %.2f C %n", cTemp);
System.out.printf ("Kub hauv Farhenheit: %.2f F %n", fTemp);
}
}
Kauj Ruam 4: Cov ntawv thov:
HIH6130 tuaj yeem siv los muab cov txheeb ze txheeb ze txheeb xyuas qhov kub thiab txias hauv cov cua txias, nkag siab lub cev, ntsuas cua sov, ua kom cua txias/de-humidifiers, thiab humidistats kom muaj kev nyob nyab xeeb. Nws kuj tseem tuaj yeem ua haujlwm hauv cov tshuab cua, cov chaw huab cua thiab cov khoom sib tham hauv xov tooj.
Pom zoo:
Raspberry Pi SHT25 Vaum & Kub Sensor Python Qhia: 4 Kauj Ruam
Raspberry Pi SHT25 Vaum & Kub Sensor Python Qhia: SHT25 I2C Vaum thiab Kub Sensor ± 1.8%RH ± 0.2 ° C I2C Mini Module. SHT25 qhov tseeb qhov ntsuas qhov ntsuas cua thiab qhov kub tau dhau los ua tus qauv kev lag luam raws li daim ntawv foos thiab kev txawj ntse, muab kev ntsuas ntsuas, ntsuas qhov ntsuas pom
ESP8266 NodeMCU Access Point (AP) rau Web Server Nrog DT11 Kub Sensor thiab Luam Ntawv Kub & Vaum Hauv Browser: 5 Kauj Ruam
ESP8266 NodeMCU Access Point (AP) rau Web Server Nrog DT11 Kub Sensor thiab Luam Ntawv Kub & Vaum Hauv Browser: Nyob zoo cov phooj ywg hauv feem ntau ntawm cov haujlwm peb siv ESP8266 thiab hauv feem ntau ntawm cov haujlwm peb siv ESP8266 ua lub vev xaib kom cov ntaub ntawv tuaj yeem nkag tau rau txhua lub cuab yeej hla wifi los ntawm kev nkag mus rau Webserver tuav los ntawm ESP8266 tab sis qhov teeb meem tsuas yog peb xav tau lub router ua haujlwm rau
Raspberry Pi HTS221 Tus txheeb ze Vaum thiab Kub Sensor Java Qhia: 4 Kauj Ruam
Raspberry Pi HTS221 Tus txheeb ze Vaum thiab Kub Sensor Java Tutorial: HTS221 yog lub tshuab ua kom muaj peev xwm loj me me rau qhov txheeb ze thiab qhov kub thiab txias. Nws suav nrog lub hauv paus ntsiab lus thiab cov teeb liab sib xyaw daim ntawv thov tshwj xeeb kev sib txuas (ASIC) los muab cov ntaub ntawv ntsuas los ntawm cov lej
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
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: 5 Kauj Ruam
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: Lub DHT11 sensor tau siv los ntsuas kub thiab av noo. Lawv yog cov khoom siv hluav taws xob nrov tshaj plaws.Qhov DHT11 cov av noo thiab ntsuas kub ua rau nws yooj yim ntxiv cov av noo thiab ntsuas kub rau koj li DIY cov phiaj xwm hluav taws xob. Nws yog rau