trying to use one inturrupt to catch 27 pins
hi, i have 27 reed switches, can not triggered simultaneously. mybe use snippet use interrupt catch/rule them all. and if so, pull-up resistor scheme work configuration. code: [select] //trying use 1 inturrupt catch 5 pins // connecting 5 reed switches same interrupt and // connecting them indevidually digital pins. volatile int state = low; volatile int whichone[]={0,0,0,0,0,0}; void setup() { attachinterrupt(0, blink, rising); //init pullup resistor for(int i=8;i<=12;i++){ pinmode(i,input); digitalwrite(i,high); } } void loop() { } void blink() { for(int i=8;i<=12;i++){ whichone[i]=digitalread(i); } } well wiring isn't correct yet. way have now, if switch turns on create short circuit +5 vdc ground. pins 8 12 directly wired ground, how can go high ever? lefty Arduino Forum > Forum 2005-2010 (read only) ...