wzschoche / arduino-pinchangeint

Automatically exported from code.google.com/p/arduino-pinchangeint
0 stars 0 forks source link

Only working 60%. #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hey, I wanted to use this lib with my LCD Keypad Shield

The Keypresses are separated by voltagedividers.

So I just wanted to attach a interrupt on the analog pin thats used by the 
keypad shield on Falling (or Change). 

But it does not seem to work properly

Here is what i tested:

Simple script wo just prints in the Voltage every second. I pressed none button 
and then another one every second, results:

Spannung: 4.995
Spannung: 0.000
Spannung: 0.643
Spannung: 1.499
Spannung: 2.339
Spannung: 3.524

(Voltage readings) so ~5V while no keypress.

The 2 Buttons that wont work for the interrupt are the last two

2,33 and 3,5V

because if i run this simple sketch which just outputs the voltage reading when 
an interrupt occurs, only prints out 

Spannung: 0.000
Spannung: 0.643
Spannung: 1.499
but not the other 2 ... neither with change or falling

Original issue reported on code.google.com by I.Punish...@gmail.com on 6 Aug 2013 at 9:04

GoogleCodeExporter commented 9 years ago
I'm afraid the voltage difference isnt enough to count as falling/change ?

Original comment by I.Punish...@gmail.com on 6 Aug 2013 at 10:11

GoogleCodeExporter commented 9 years ago
Interrupts only work on digital signals (0 or 1... 0v or 5v). Are you trying to 
use this with analog inputs? If so, it won't work. You'll have to code for the 
A-to-D converter.

Original comment by m...@schwager.com on 13 Aug 2013 at 11:21