-
PROHARDVER!
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
#96292352
törölt tag
válasz
#96292352 #1146 üzenetére
Ebben van a baj:
int DHpin = 7;
int DH2pin = 9;
byte dat [5];
byte dat2 [5];
byte read_data () {
byte data;
for (int l = 0; l < 8; l ++) {
if (digitalRead (DHpin) == LOW) {
while (digitalRead (DHpin) == LOW); // wait for 50us
delayMicroseconds (30); // determine the duration of the high level to determine the data is '0 'or '1'
if (digitalRead (DHpin) == HIGH)
data |= (1 << (7-l)); // high front and low in the post
while (digitalRead (DHpin) == HIGH); // data '1 ', wait for the next one receiver
}
}/* 2nd sensor */
byte dat2;
for (int i = 0; i < 8; i ++) {
if (digitalRead (DH2pin) == LOW) {
while (digitalRead (DH2pin) == LOW); // wait for 50us
delayMicroseconds (30); // determine the duration of the high level to determine the data is '0 'or '1'
if (digitalRead (DH2pin) == HIGH)
data |= (1 << (7-i)); // high front and low in the post
while (digitalRead (DH2pin) == HIGH); // data '1 ', wait for the next one receiver
}
}
return data;
}
Új hozzászólás Aktív témák
- Dobozos Új gamer MSI Katana 15 /i7-12650H/16GB/1TB SSD/RTX 4070 8GB GB/144Hz/Gari
- Huawei Watch Fit 4 Pro 3 év garancia, Huawe Freebuds 2
- Xiaomi Redmi 14 PRO 5 G 8/256 DUAL garanciával
- Dell Precision 7670 FHD+ i9-12950HX 16C / 64G D5 / 1T G4 / Quadro RTX A4500 16GB / HU vb Pro tervező
- LG OLED55G42LW LG Gyári garancia 3 év
- AKCIÓ! Csere-Beszámítás! Manli RTX 3070Ti 8GB GDDR6X Videokártya!
- Samsung Galaxy Z Fold5 , 12/256 GB , Kártyafüggetlen
- ÁRCSÖKKENTÉS TP-Link Archer C1200 Router eladó (1200 Mb/s Wi-Fi)
- HUAWEI MateBook 13 2020 - Kijelző nélkül - I7-10510U - 16GB - 512GB SSD - Win11 - MAGYAR
- Amazon Kindle 10th Generation ébresztős tok
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest