Prezentace 21, arduino auto.
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
#include <IRremote.h>
|
||||
int RECV_PIN = 12;
|
||||
IRrecv irrecv(RECV_PIN);
|
||||
decode_results results;
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
irrecv.enableIRIn(); // Start the receiver
|
||||
}
|
||||
void loop() {
|
||||
if (irrecv.decode(&results)) {
|
||||
Serial.println(results.value, HEX);
|
||||
irrecv.resume(); // Receive the next value
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user