I have a strange one that I hope someone can explain so I don’t go mad.
Iam using a pir sensor to wake an Arduino attached to interrupt 0 (nothing out of the ordinary)
However I am able to wake the Arduino even with there being no connection between the pir sense pin and the interrupt pin. I discovered this after I had accidentally pulled out the connecting wire and realised that mcu was waking from sleep still (full power down)
Any idea how this is still working? Is this witchcraft ?
Hardware is a Arduino mega core board using avr/sleep library.
I'm using the software serial library for the rx pin if this has any relevance.
It does not.
With nothing connected to the pin, not even a pullup resistor (there's one built in that you COULD use), the pin floats. No telling whether it is HIGH or LOW or bouncing around the back side of the moon.
Floating inputs are inputs that are not connected to anything. As a result, they can pick up noise from the environment; that noise will fluctuate all the time and will result in zeroes and ones (depending on the level of the noise).
Your problem should go away at the moment that you connect the sensor.
sterretje:
Floating inputs are inputs that are not connected to anything. As a result, they can pick up noise from the environment; that noise will fluctuate all the time and will result in zeroes and ones (depending on the level of the noise).
Your problem should go away at the moment that you connect the sensor.
But how is the affecting my sketch/project. The sensor is connected to an input pin its just not connected to an interrupt pin also.