Society of Robots - Robot Forum

Software => Software => Topic started by: santidr on February 20, 2014, 07:55:20 PM

Title: Problem when opening Serial Monitor (Arduino)
Post by: santidr on February 20, 2014, 07:55:20 PM
Hi guys! i came here because y need your help, here's what happens:

I format my pc last weekend so now i'm installing everything again, and one of the sofrwares i had to re install is arduino, and thats what i did

I conected my Arduino mega, using the usb, then i installed the drivers, and then i tried to test one of my old basic programs, to test a sensor, here is the program:
Code: [Select]
void setup()
{
  Serial.begin(9600);
}
void loop()
{
  Serial.println(digitalRead(2)); // print the data from the sensor
  delay(1000);
}

It runs properly, but the problem came when i try to open the Serial Monitor, in order to see whether the sensor is detecting something or not... and thats what i get:

Quote
Exception in thread "EventThread COM3" java.lang.NullPointerException
   at processing.app.Serial.serialEvent(Serial.java:179)
   at jssc.SerialPort$EventThread.run(SerialPort.java:1112)


If you have some idea of how to solve it, i will really apreciate it!!!!
Title: Re: Problem when opening Serial Monitor (Arduino)
Post by: jwatte on February 21, 2014, 10:37:48 AM
Check if the COM port is another number, and change it in the settings.
If it's not that, perhaps it's a permission issue; try re-launching Arduino IDE as administrator.