I have connected a honeywell magnetic door contact to pin 10 on the arduino with a pull up resistor configuration. 1k Resistor from 5v through contact sensor to gnd, with pin 10 connected between the resistor and sensor. Using a multimeter, I can verify logic high and low when the magnet is pulled away and placed near the sensor. Pin 10 is setup as an INPUT. I have a simple if pin 10 is low then do this loop. The problem is anytime the sensor is activated via the magnet the arduino locks up and needs to be reset. If I move the same input to pin 5 there is no problem, everything works as it should.
#define alarmCheck 5//<----- Works when pin 5 does not work when pin 10
#define DATAOUT 11 //MOSI
#define DATAIN 12 //MISO
#define SPICLOCK 13 //sck
#define RTC_CHIPSELECT 7 // chip select (ss/ce) for RTC, active high
#define txPin 4 //Software Serial port for LCD display
#define UDTI 2 //Update Time Interrupt
#define UMEI 3 //Update MEnu Interrupt
#define ENC_A 8 //Rotary Encoder Pin A
#define ENC_B 9 //Rotary Encoder Pin B
#define ENC_PORT PINB
Is the way I defined the pins setting some setting on Pin 10 that I am unaware of?
Any ideas?