I was looking for the keyword "Interrupt" in the doku, never thought to look for "Branch" ...
But I suppose, you meant UdpBranch, not SerialBranch, right?
Btw.: The new Terminal is really helpfull! Thank you so much, for your increddible work!
Explore... Chat... Share...
joeygbsn wrote:Here is some simple udp code to toggle a relay. Both of the esps set up udp servers. The master sends the slave a 0 or a 1 to toggle the pin state, and the slave sends the status of the pin back to the master.
You can toggle the pin by connecting to the master website and clicking the button. You would have to add some handshaking or something if you want to add more slaves. This works very reliably though for me so far with very little lag on v3 a39.
master code:Code: Select all
let data = 0
let stat = "OFF"
wprint "Status = "
button "Toggle Relay", [doit]
timer 500, [read]
if data = 1 then let data = 0 else let data = 1
udpwrite "192.168.0.109", 8082, str(data)
let stat = udpread()
slave code:Code: Select all
let stat = "OFF"
let rec = val(udpread())
if rec = 1 then let stat = "ON" else let stat = "OFF"
udpwrite "192.168.0.102", 8081, stat
First, very often, bosses don't expect to releas[…]
Clear, I missed that completely. There are severa[…]
Your servo would have pulled a higher current as i[…]
SPIFFS is deprecated because the original author h[…]
Yes, the crypto is too big, but I'm not expert wit[…]
The 3 second connection time is if you're using a […]
Hi Buddies, I looked into the SDK libraries from […]
No, these sections are not copied into the final i[…]
PROGMEM is not an ESP8266 concept, you're probably[…]
My point is that there is SPECIALISED subforum for[…]
What type of "connection" are you referr[…]
Well, turned out I forgot to put the jumper back o[…]
Thank you. That's pretty much what I expected, bu[…]
if you don't start the serial it won't serve the s[…]
When you are sniffing using promiscuous mode, you […]
I'm looking for some tutorial for esp8266 and MQ2[…]
Why not give it a try and see what happens?
Hello, I got this esp01 lying around, and wanted t[…]
The serial number is the chip ID in your screen sh[…]