/* Cavendish Arduino Script. Slow readout script. Works only for single channel active at a time. On a time scale of ~ 0.1 s. Created: 30 Mar 2013 by Wing H To, UCSB HEX Group Updated: 10 Apr 2013 by Wing H To, UCSB HEX Group */ // the setup routine runs once when you press reset: void setup() { Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin 0: for(int i=0;i<10;i++){ bool ChnDig = digitalRead(i); if(ChnDig) { Serial.println(i); Serial.println(millis()); } delay(10); } }