We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › ERROR ARDUINO
Page Index Toggle Pages: 1
ERROR ARDUINO (Read 2073 times)
Jun 15th, 2010, 9:30am
Hello, I am newbie in Arduino and Processing
and this year for my Bachelor i made project with.

I created a system of interaction with laser diodes, Processing
and Arduino.
When the lasers are activated, sound + video are generated.

So I program with Processing, everything works perfectly when I use instead of Arduino, my keyboard, but when I connect my computer to the Arduino ... nothing happens.

I have this error message

Exception in thread "Animation Thread" java.lang.NullPointerException
    at LASERHARPE2_pde.keyReleased(LASERHARPE2_pde.java:155)
    at processing.core.PApplet.handleKeyEvent(PApplet.java:1756)
    at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1735)
    at processing.core.PApplet.handleDraw(PApplet.java:1437)
    at processing.core.PApplet.run(PApplet.java:1327)
    at java.lang.Thread.run(Thread.java:613)

I have eight lasers, each laser has a name: laser a, b, c, d, e, f, g, h.
and each laser had a function on Processing .

What does it mean ?

Reply #1 - Jun 15th, 2010, 1:31pm
- Avoid all caps subjects (it is like shouting!)
- Read the stickies in the forums (the Software Bugs section isn't for posting about bugs in your software, and you shouldn't post there anyway).

NullPointerException usually means you are trying to use an object but it is null, ie. not initialized.
For example using someObject.someMethod() or someObject.someField
Check you did your initializations correctly.
Page Index Toggle Pages: 1