Recording switch


hi guys in middle of project , facing big problem

i using sparkfun el sequencer,xbee , el sequence , xbee plugged laptop  , want hook switch 1 of channels
and make input instead of output ... when switch on ... writes "on" on computer , starts counting  delay(); , when switch off ... writes "off" , counts delat();

this piece of code using
void setup() {
  pinmode(2,output);
  pinmode(3,output);
  pinmode(4,output);
  pinmode(5,output);
  pinmode(6,output);
  pinmode(7,output);
  pinmode(8,output);
  pinmode(9,output);
 
  serial.begin(9600);
}

please me code asap

all code set pins outputs.  missing loop() function.  there number of examples in tutorials , believe there 1 comes ide explain how read state of switch , output serial. 


Arduino Forum > Using Arduino > Programming Questions > Recording switch


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code