Processing Forum
Processing code:
- import processing.serial.*;
- Serial myPort;
- int numChannels = 16;
- void setup() {
- size(1280,800);
- // println(Serial.list());
- myPort = new Serial(this, Serial.list()[0], 9600);
- background(0);
- }
- void draw() {
- }
- void mouseMoved() {
- int ID = int(map(mouseX,0,width,0,numChannels));
- myPort.write(ID);
- }