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.
Gyorskeresés
Legfrissebb anyagok
Általános témák
LOGOUT.hu témák
- [Re:] [sziku69:] Fűzzük össze a szavakat :)
- [Re:] [D1Rect:] Nagy "hülyétkapokazapróktól" topik
- [Re:] [gban:] Ingyen kellene, de tegnapra
- [Re:] [btz:] Internet fejlesztés országosan!
- [Re:] [kraftxld:] Diáklaptop - Dell Latitude 3140 - Királyunk ajándéka
- [Re:] Olcsó USB WiFi AC adapter
- [Re:] [Luck Dragon:] Asszociációs játék. :)
- [Re:] [Mr Dini:] Mindent a StreamSharkról!
- [Re:] [sziku69:] Szólánc.
- [Re:] eBay-es kütyük kis pénzért
Szakmai témák
PROHARDVER! témák
Mobilarena témák
IT café témák
Útvonal
Fórumok » Egyéb hardverek » Mikrokontrollerek Arduino környezetben (programozás, építés, tippek)Téma összefoglaló
Hozzászólások
![](http://cdn.rios.hu/dl/faces/del.png)
#96292352
törölt tag
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;
}