Move the LCD data lines to 6,7,8,and 9 because the MUX Shield uses 2,3,4,and 5 for addressing. Then change the LiquidCrystal calls to specify the new location of the data lines.
Ok thanks will do,but I am still not sure how to address the individual pins on the mux in my code.
For example how would you get this code to work when using the mux
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin1 = 2; // the number of the pushbutton pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
Serial.begin(9600);
// initialize the pushbutton pin as an input:
pinMode(buttonPin1, INPUT);
}
void loop(){
if (digitalRead(buttonPin1) == LOW) {
digitalWrite(ledPin, LOW); // turn LED OFF
} else if (digitalRead(buttonPin2) == LOW) {
digitalWrite(ledPin, HIGH); // turn LED ON
}
}
Perhaps you need to examine the schematic diagram of the shield and study the datasheet of the mux chip to see what is connected to where and how the chip works.