thanks, rob.
ok, so an update.
i pullup-ed the 4051 inputs with 15 ohm resistors. i also pulled up the arduino input with a resistor of greater value.
my revised function looks like this:
void doSensorScan() { // look at all the sensors
for(int i=0; i<4; i++){
// select multiplexer channel
digitalWrite(s0Pin, i & 0x1);
digitalWrite(s1Pin, (i>>1) & 0x1);
digitalWrite(s2Pin, (i>>2) & 0x1);
delay(1); // delay to allow sample & hold capictor to charge
currentState[i] = digitalRead(mux1); // read mux1 in first 8 array locations
if(currentState[i] == LOW)
{ Serial.println(i); }
}
}
now, i get proper data....that is, most the time....for instance, here is a sample of me pushing a button (no println for space purposes)
11111111111111111111111110111111212121101121111101011211111110121123123231
notice that the proper data appears at first, but then gets garbled.
especially on tact switch repress...
i am unsure whether this is an issue with my code or with my circuit. i can post another crude drawring if necessary.