Hello, I am trying to create a wifi box. Using the available code, I made some modifications to use esp8266, I got it to work halfway. In the EOS terminal I see that it receives ping and subcrisciption of parameters. The problem is in the last part of the code when we ask that you receive parameters from EOS.
the original code says
and I'm trying to do it that way
size = Udp.available(); if (size > 0) { // Fill the msg with all of the available bytes while (size--) curMsg += (char)(Udp.read()); } if (Udp.endofPacket()) { parseOSCMessage(curMsg); lastMessageRxTime = millis(); // We only care about the ping if we haven't heard recently // Clear flag when we get any traffic timeoutPingSent = false; curMsg = String(); }
if (lastMessageRxTime > 0) { unsigned long diff = millis() - lastMessageRxTime; //We first check if it's been too long and we need to time out if (diff > TIMEOUT_AFTER_IDLE_INTERVAL) { connectedToConsole = ConsoleNone; lastMessageRxTime = 0; updateDisplay = true; timeoutPingSent = false; }
//It could be the console is sitting idle. Send a ping once to // double check that it's still there, but only once after 2.5s have passed if (!timeoutPingSent && diff > PING_AFTER_IDLE_INTERVAL) { OSCMessage ping("/eos/ping"); ping.add(BOX_NAME_STRING "_hello"); // This way we know who is sending the ping Udp.beginPacket(outIp, outPort); ping.send(Udp); Udp.endPacket(); timeoutPingSent = true; } }
if (updateDisplay) displayStatus();}}
I have the problem in the line marked in red. what would be the correct way to translate this for "Udp"?
Thanks!!
wemos d1
which LCD library?
Yes, the screen works correctly. the message box1 waiting appears
I need the name or link of the LCD library to compile
LiquidCrystal_I2C-master.zip
I think the problem is with the selection of the console model. maybe as there is no handshake
I can't compile because the LCD library is not compatible. Did you use a newer or different one?There is many unusefull stuff in the library so have made my own libraries at https://github.com/sstaub/lighthack
The library I use is that. It is the only screen library that I have in my library folder.
0535.LiquidCrystal_I2C-master.zipThis the original
However, I'm on on macOS with Arduino IDE 1.8.12 and can't compile with library.I will look tomorrow deeper inside.
I'm also in mac and with 10.8.11
Mountain Lion ?
mojave
The main problem is the use of size = Udp.available(); you must use size = Udp.parsePacket();I attached a cleaned code without cobalt and color source stuff. Hope it works because I cannot test it with a real environment.enviar_3.zip
seen also that no ip address is configured.2043.enviar_3.zip