Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.serial.*;
- Serial port;
- float time;
- void setup(){
- size(600, 600);
- port = new Serial(this, "COM7", 9600); // Starts the serial communication
- }
- void draw() {
- port.write((byte)((sin(time * 0.01) + 1.0) * 127));
- time += 10;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement