Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 10 months ago.
processing Mbed
hello,
How to serial Mbed in processing ? I use this program in processing :
import processing.serial.*; import org.mbed.RPC.*;
mbed mbed; PwmOut led1; PwmOut led2; void setup() { size(480, 120); smooth(); mbed = new SerialRxTxRPC("COM5", 9600); led1 = new PwmOut(mbed, mbedRPC.LED1); led2 = new PwmOut(mbed, mbedRPC.LED2);
}
void draw() { double Position = mouseX; double Brightness = (Position/480); if (mousePressed) { led1.write(Brightness); } else { led2.write(Brightness); } }
thank you.