Skip to content

Commit 4a2cc12

Browse files
committed
Remove references to A2 (FET gate) when on ESP8266
1 parent 9ae9146 commit 4a2cc12

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/hackair.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ void hackAIR::clearData(hackAirData &data) {
143143
}
144144

145145
void hackAIR::enablePowerControl() {
146+
#ifndef ESP8266
146147
pinMode(A2, OUTPUT);
148+
#endif
147149
}
148150

149151
void hackAIR::turnOn() {
@@ -152,7 +154,9 @@ void hackAIR::turnOn() {
152154
// Send anything to wake up the sensor
153155
_serial.write(0x01);
154156
} else {
157+
#ifndef ESP8266
155158
digitalWrite(A2, HIGH);
159+
#endif
156160
}
157161
}
158162

@@ -169,6 +173,8 @@ void hackAIR::turnOff() {
169173
_serial.flush();
170174
while (_serial.read() != -1) {}
171175
} else {
176+
#ifndef ESP8266
172177
digitalWrite(A2, LOW);
178+
#endif
173179
}
174180
}

0 commit comments

Comments
 (0)