-
GAMEPOD.hu
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
- Eladó Canon EOS-550D váz + EF-S 50mm f/1.8 objektív (fix fókuszú/makró)
- Lenovo ThinkPad T470s, I7-6600U, 8GB RAM, FHD, 2 év garancia, áfás számla! (43)
- Samsung Galaxy S23 Ultra 1TB + 12GB RAM Gyári független (Phantom Black) SM-S918 + 24 hó garancia
- Samsung Galaxy S23 Ultra 1TB + 12GB RAM Gyári független (Phantom Black) SM-S918 + 24 hó garancia
- LG 65" B3 OLED 4K HDR SMART 120HZ GAMING TV
Állásajánlatok
Cég: Ozeki Kft.
Város: Debrecen