Cesar_Morisco
Active Member
Hey guys
All good.
I'm stuck on this question
Record the status of the relay and switch it off
On my example it writes and reads the error relay status and the program restarts and exits MQTT
Does anyone have an idea how to solve this
I don't have much knowledge
Here is the code I'm using Thank you
All good.
I'm stuck on this question
Record the status of the relay and switch it off
On my example it writes and reads the error relay status and the program restarts and exits MQTT
Does anyone have an idea how to solve this
I don't have much knowledge
Here is the code I'm using Thank you
B4R:
Dim STAR As Int
STAR = 1
eeprom.WriteBytes(bc.IntsToBytes(Array As Int(STAR)),2)
STAR = 0
eeprom.WriteBytes(bc.IntsToBytes(Array As Int(STAR)),2)
Dim b() As Byte = eeprom.ReadBytes(0, 2)
b = eeprom.ReadBytes(2, 2)
STAR = bc.IntsFromBytes(b)(0)
If STAR = 1 Then
Log("NO RELAY 1")
PinGPIO05.DigitalWrite(TRUE)'Relay 1
Else
Log("OFF RELAY 1")
PinGPIO05.DigitalWrite(FALSE)'Relay 1
End If