Hardware model - Wemos D1 mini & wifi
iOS latest version
Arduino IDE latest version.
Blynk servers
Latest Blynk library
Hi everyone,
I want to read the state of a physical pin (RELAY_Pin), and output that to my app LED (V6).
I can get it to work with:
byte output = digitalRead(RELAY_Pin); //set "output" to the same state of relay output pin D6
if (output == HIGH)
{
virtualLED.on();
}
else
virtualLED.off();
But is there a way to get this working:
Blynk.virtualWrite(V6, digitalRead(RELAY_Pin)); //write 1 or 0 to pin V6, but need 0 or 255 for widget led
It only send 1 or 0, which are read on app as brightness levels from 0-255.
Thanks