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:
Serial.println(digitalRead(2)); // print the data from the sensor
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:
Exception in thread "EventThread COM3" java.lang.NullPointerException
If you have some idea of how to solve it, i will really apreciate it!!!!