// Give ADC (analog to digital converter) some time to settle down.
delay(20);
// PC への送信(ツマミ入力)
int state = analogRead(36);
OSCMessage mess("/ana36");
// As a value, add the current value of analog 0 input.
mess.add(analogRead(36)/32);
udp.beginPacket(ipClient, port_out);
mess.send(udp);
udp.endPacket();
mess.empty();
Serial.println(analogRead(36)/32);
// つぎへ
delay(30); // 少し待つ(通信速度の調整)
}
______
参考 OSC で ESP と PC を無線でつなぐ CONTROLLING A MIDI CC IN ABLETON LIVE WITH AN ARDUINO UNO