|
- #include <OSCMessage.h>
-
-
- #include <Ethernet.h>
- #include <EthernetUdp.h>
- #include <SPI.h>
- #include <OSCMessage.h>
-
- EthernetUDP Udp;
-
-
- IPAddress ip(128, 32, 122, 252);
-
- IPAddress outIp(128, 32, 122, 125);
- const unsigned int outPort = 9999;
-
- byte mac[] = {
- 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
- void setup() {
- Ethernet.begin(mac,ip);
- Udp.begin(8888);
-
- }
-
-
- void loop(){
-
- OSCMessage msg("/analog/0");
- msg.add((int32_t)analogRead(0));
-
- Udp.beginPacket(outIp, outPort);
- msg.send(Udp);
- Udp.endPacket();
- msg.empty();
-
- delay(20);
- }
|