Send message from Processing to Touch OSC Mk1 to update a led status

Oh OK. You said in the first post you were creating a custom MIDI controller. Didn’t read the rest of the thread, sorry!

This blinks the toggle button on your layout file. Note I’ve used a broadcast address for the ipad which is sometimes a bad idea for wifi.

import oscP5.*;

static final  NetAddress ipad = new NetAddress ("192.168.42.255", 9000);    // incoming port
OscP5 oscP5 = new OscP5 (this, 8000);      // set touchosc incoming port to this
OscMessage myMessage;
int time;
boolean toggle;

void setup() {
  
}

void draw() {
  if (millis() > time + 250) {
    time=millis();
    myMessage = new OscMessage("/1/toggle_button");
    if (toggle)
      myMessage.add (1.0);
    else
      myMessage.add (0.0);
    oscP5.send (myMessage, ipad);
    toggle=!toggle;
  }
}