In the app I see that I have a “Low -/- High” graphic in every other widget I can modify this graphic as I need. I cant modify a switch to be “HIGH/LOW” (the reverse)
Using the cheap optio isolator relay boards they switch on with High.
So when I click a button in the blynk app it lights up green for “on” but really my circut is off, so I either need to invert logic with a chip in hardware (not ideal) or need to dig into the library and reverse logic in software (not ideal for what Blynk is here for)
So could I please request that that logic for switches is “reversable”
hello…
I have apply this change in BlynkApiArduino.h
if (!strcmp(cmd, “dw”)) {
//BLYNK_LOG(“digitalWrite %d -> %d”, pin, it.asInt());
pinMode(pin, OUTPUT);
digitalWrite(pin, !it.asInt() ? HIGH : LOW);
!it.asInt()
! to invert the digital value!!
its work good…
@toreg,
Well that’s funny ) just remember it will impact all of the pins. A better way would be to create a virtual pin and reverse the logic there. Cheers!