Closed AlexValois closed 7 years ago
Mmhm? If it is needed to switch the output to HIGH or LOW to switch the light/LED on, depends on how you wire the output.
It is more usual* to connect collector or cathode (e.g. of ULN2003) to the output, so in this case it is necessary to switch to LOW for on.
If you connect a single LED with its anode or an n-type FET you would need to send HIGH for on.
*) As most microcontrollers, the ESP8266 can sink more current than it can source.
Hi,
I think there is a little error in the LightOnOff sketch example.
digitalWrite(PIN_RELAY, on ? HIGH : LOW);
should bedigitalWrite(PIN_RELAY, on ? LOW : HIGH);
Thanks again for the great job on Homie-esp8266 !Alex
Update : after new compilation, the behavior is correct...don't really understand why. Please ignore this issue.