We are about to switch to a new forum software. Until then we have removed the registration on this forum.
import processing.serial.*; import org.firmata.*; import cc.arduino.*;
Arduino arduino;
int S1 = 0; int A; void setup() { size(500, 500); ellipseMode(CENTER);
arduino = new Arduino(this, Arduino.list()[0], 57600);
arduino.pinMode(S1, Arduino.INPUT); }
void draw() {
A = arduino.analogRead(S1); println(A); if (A ==1) { ellipse(width/2,height/2,100,100); } }
Answers
https://forum.processing.org/two/discussion/16224/a-problem-cannot-convert-from-void-to-boolean