I have 16 channel multiplexer from sparkfun:
and i want to read the c12 channel. Should i connect the enable to GND? Thats what i have done...
My code outputs this:
219351 131
222356 350
225361 138
228367 0
231371 0
234375 0
237379 39
240384 0
byte S0 = 16;
byte S1 = 6;
byte S2 = 7;
byte S3 = 8;
byte signal = 0;
void setup() {
digitalWrite(S0,LOW);
digitalWrite(S1,LOW);
digitalWrite(S2,HIGH);
digitalWrite(S3,HIGH);
Serial.begin(19200);
}
////////////////////////////////////////////////////////////
void loop()
{
Serial.print(millis());
Serial.print("\t");
Serial.println(analogRead(signal));
delay(3000);
}