Hi,
I am using ESP-01 with Relay and wrote the following code to test opening and closing the relay. It did not work. I found out I need to send "A00101A2 open relay; A00100A1 to close the relay, command format must be hex". How I can send such command in format hex?
Thank you.
I am using ESP-01 with Relay and wrote the following code to test opening and closing the relay. It did not work. I found out I need to send "A00101A2 open relay; A00100A1 to close the relay, command format must be hex". How I can send such command in format hex?
Thank you.
B4X:
Sub Process_Globals
Private d1pins As D1Pins
Private PPin As Pin
End Sub
Private Sub AppStart
Serial1.Initialize(9600)
Log("AppStart")
WiFiServer.Start
ConnectToNetwork
PON
Delay(5000)
POFF
End Sub
Public Sub PON
PPin.Initialize(d1pins.D0,PPin.MODE_OUTPUT)
PPin.DigitalWrite(True)
End Sub
Public Sub POff
PPin.Initialize(d1pins.D0,PPin.MODE_OUTPUT)
PPin.DigitalWrite(False)
End Sub