Enable running pde from vs code

This commit is contained in:
Dennis Schoepf 2020-09-21 12:03:05 +02:00
parent 039e4758f1
commit a443b5b412
4 changed files with 114 additions and 10 deletions

View file

@ -9,29 +9,28 @@ int radius = 0;
void setup() {
/* Set up screen */
fullScreen();
background(255);
/* Set up communication with arduino */
background(0);
/* Set up communication with arduino
String portName = Serial.list()[Serial.list().length - 1]; //change index to match your port
arduinoPort = new Serial(this, portName, 9600);
arduinoPort = new Serial(this, portName, 9600); */
}
void draw() {
background(255);
if ( arduinoPort.available() > 0) {
println("Test");
/* if ( arduinoPort.available() > 0) {
String rec = arduinoPort.readStringUntil('\n');
if (rec != null) {
receivedMessage = rec;
}
// Check for specific events and act upon them
if (receivedMessage != null && receivedMessage.contains("isWithinThreshhold")) {
cameIntoThreshhold = true;
}
}
circle(width / 2, height / 2, radius);
fill(0);
radius += 10;
radius += 10; */
}