Skip to content

Commit e7e958b

Browse files
authored
Add files via upload
1 parent 893eb6b commit e7e958b

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed
46.5 KB
Binary file not shown.

ESP32 RainMaker/ir-codes.ino

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <IRremote.h>
2+
const byte IR_RECEIVE_PIN = 14;
3+
4+
void setup(){
5+
Serial.begin(115200);
6+
IrReceiver.begin(IR_RECEIVE_PIN); // Start the IR receiver
7+
}
8+
void loop(){
9+
if (IrReceiver.decode()) {
10+
String ir_code = String(IrReceiver.decodedIRData.command, HEX);
11+
if(ir_code.equals("0")) {IrReceiver.resume();return; }
12+
13+
Serial.println(ir_code);
14+
IrReceiver.resume();
15+
}
16+
delay(1000);
17+
}

ESP32 RainMaker/wiring relay.png

792 KB
Loading

ESP32 RainMaker/wiring.png

1.28 MB
Loading

0 commit comments

Comments
 (0)