Skip to content

Commit

Permalink
pin configuration for Wemos D1 R2
Browse files Browse the repository at this point in the history
  • Loading branch information
jiripraus committed Apr 30, 2020
1 parent bb744e7 commit 539b7e2
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
6 changes: 6 additions & 0 deletions examples/gateway/gateway.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
//#define BOILER_IN 5
//#define BOILER_OUT 14

// Wemos D1 R2
//#define THERMOSTAT_IN 16
//#define THERMOSTAT_OUT 4
//#define BOILER_IN 5
//#define BOILER_OUT 0

// Arduino UNO
#define THERMOSTAT_IN 2
#define THERMOSTAT_OUT 4
Expand Down
4 changes: 4 additions & 0 deletions examples/master/master.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
//#define BOILER_IN 5
//#define BOILER_OUT 14

// Wemos D1 R2
//#define BOILER_IN 5
//#define BOILER_OUT 0

// Arduino UNO
#define BOILER_IN 3
#define BOILER_OUT 5
Expand Down
35 changes: 28 additions & 7 deletions examples/selftest/selftest.ino
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
// Wemos D1 R1
#define THERMOSTAT_IN 16
#define THERMOSTAT_OUT 4
#define BOILER_IN 5
#define BOILER_OUT 14

// Wemos D1 R2
//#define THERMOSTAT_IN 16
//#define THERMOSTAT_OUT 4
//#define BOILER_IN 5
//#define BOILER_OUT 14
//#define BOILER_OUT 0

// Arduino UNO
#define THERMOSTAT_IN 2
#define THERMOSTAT_OUT 4
#define BOILER_IN 3
#define BOILER_OUT 5
//#define THERMOSTAT_IN 2
//#define THERMOSTAT_OUT 4
//#define BOILER_IN 3
//#define BOILER_OUT 5

void setup() {
pinMode(THERMOSTAT_IN, INPUT);
Expand All @@ -34,8 +40,23 @@ void setup() {
* - Interconnect BLUE THERM and GREEN BOILER terminals with each other with 2 wires. Polarity does not matter at all.
*/
void loop() {
Serial.println();
/*
digitalWrite(BOILER_OUT, HIGH);
delay(10);
Serial.print("H => ");
Serial.println(digitalRead(THERMOSTAT_IN));
delay(1000);
digitalWrite(BOILER_OUT, LOW);
delay(10);
Serial.print("L => ");
Serial.println(digitalRead(THERMOSTAT_IN));
delay(1000);
return;
*/
Serial.print("Boiler inbound, thermostat outbound .. ");
digitalWrite(THERMOSTAT_OUT, HIGH);
digitalWrite(BOILER_OUT, HIGH);
Expand Down Expand Up @@ -82,5 +103,5 @@ void loop() {
Serial.println("Thermostat is high even if no signal is being sent");
}

delay(5000);
delay(1000);
}
4 changes: 4 additions & 0 deletions examples/slave/slave.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
//#define THERMOSTAT_IN 16
//#define THERMOSTAT_OUT 4

// Wemos D1 R2
//#define THERMOSTAT_IN 16
//#define THERMOSTAT_OUT 4

// Arduino UNO
#define THERMOSTAT_IN 2
#define THERMOSTAT_OUT 4
Expand Down

0 comments on commit 539b7e2

Please sign in to comment.