I tested sending OSC with OSCLib-for-ESP8266, this is really cool
How can I try to receive OSC and parse message ? is trying to adapt the ARDOSC lib would be a good lead ?
My knowledge in building library is very limited....
cheers
Olivar
Explore... Chat... Share...
#include <mem.h>
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCBundle.h>
long sendCount = 0;
const char* ssid = "mynetwork";
const char* password = "mypassword";
// a instance of UDP to send and receive packets (udp, oviously!;)
WiFiUDP Udp;
const IPAddress outIp(192, 168, 1, 100); //ip address of the receiving host
const unsigned int outPort = 9001; //host port
void setup() {
Serial.begin(115200);
// Connect to WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
}
void loop() {
OSCBundle msg;
msg.add("/X").add((int32_t)(random(0,255)));
msg.add("/Y").add((int32_t)(random(0,255)));
msg.add("/Z").add((int32_t)(random(0,255)));
msg.add("/ax").add((int32_t)(random(0,255)));
msg.add("/ay").add((int32_t)(random(0,255)));
msg.add("/az").add((int32_t)(random(0,255)));
Udp.beginPacket(outIp, outPort);
msg.send(Udp);
Udp.endPacket();
msg.empty();
delay(100);
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]