Beginners question: WHAT DOES THIS MEAN?
in
Integration and Hardware
•
5 months ago
Exception in thread "Animation Thread" java.lang.NullPointerException
at Breathing_proccessing_visuals.draw(Breathing_proccessing_visuals.java:37)
at processing.core.PApplet.handleDraw(PApplet.java:2266)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
at processing.core.PApplet.run(PApplet.java:2140)
at java.lang.Thread.run(Thread.java:680)
I've been trying to draw using processing and an arduino with sensor. The code is fairly basic but I'm fairly sure it's good to do what I want however each time I go play it on processing I get this message. Is this a problem with the code or with the drivers etc. on my computer?
Full code for context:
import processing.serial.*;
import cc.arduino.*;
Arduino W;
void setup() {
background(51);
size(800,600);
}
void draw(){
int pot1 = W.analogRead(0);
ellipse(100,100,100,100);
fill(pot1,pot1/12);
}
1