Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cc.arduino.*;
- import processing.serial.*;
- Serial port;
- String resistor="-";
- PFont font;
- void setup()
- {
- String portName=Serial.list()[0];
- port = new Serial(this, portName, 9600);
- size(250, 250);
- background(10,10,10);
- smooth();
- textFont(createFont("Georgia", 36));
- textAlign(CENTER);
- }
- void draw()
- {
- background(10);
- if(port.available()>0)
- {
- resistor=port.readString();
- // delay(10);
- }
- fill(255, 255, 255);
- text("Resistencia:", height/2, width/4);
- text(resistor, height/2, width/2);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement