Thanks for the replies ReverseEMF and for the schematics. I currently have this wired up as per your diagram
And am not having any luck.
I dont own any resistors so I will buy some 2K ones today. All I am after is a Boolean on and off, I dont need values.
How I am reading the pin is exactly as you stated.
Connect "SIG" to an Analog Input, in Setup, do an pinMode(analogInput, INPUT), and then, to read the level, do an analogRead(analogInput). analogInput is, of course, defined as the pin number you connected SIG to [e.g. #define analogInput A1]
Without waiting for these 2k resistors to arrive. Is there any other way I could get this working?
Should I also purchase a Zenner Diode (BZX84) ?