Hirdetés
-
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
- Bomba ár! Dell Latitude 3410 - i3-10110U I 8GB I 256SSD I HDMI I 13,3" FHD Touch I Cam I W11 I Gari
- Bomba ár! Dell Latitude E5550 - i5-5GEN I 8GB I 128SSD I 15,6" FHD Touch I HDMI I W10 I Cam I Gari!
- Bomba ár! Dell Latitude E5540 - i5-4GEN I 4GB I 240SSD I Nvidia I 15,6" FHD I Cam I W10 I Garancia!
- Olcsón Google Nest Mini 2nd Gen
- Bomba ár! Dell Latitude E5530 - i5-3GEN I 4GB I 320GB I HDMI I 15,6" HD I W10 I Gari!
- BESZÁMÍTÁS! ASUS H510M i5 10500 16GB DDR4 512GB SSD RX 6600 8GB Zalman T4 Plus ADATA 600W
- Huawei P30 Pro / 6/128GB / Kártyafüggetlen / 12Hó Garancia / Kijelzőn beégés
- Wacom Bamboo One CTF-430 rajztábla
- Unihertz Tank 3 Pro 8849 5G, 100 lumen / 120 Hz DLP projektor, óriási 23 800 mAh 16/512 GB
- Most èrkezett! Kingston 1TB NV3!
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest
ekkold

