MUX74HC4067 data value increasing not 0 or 1 when pressed

Hi am connecting to a MUX74HC4067 and reading the value of each pin. All the values keep increment together until reaching 227 then it starts over. I am unsure what is wrong I am setting the pins later as I will eventually retrieve these from a ini file to configure the board when it is all working correctly.

#include "MUX74HC4067.h"

// Creates a MUX74HC4067 instance
// 1st argument is the Arduino PIN to which the EN pin connects
// 2nd-5th arguments are the Arduino PINs to which the S0-S3 pins connect

//MUX74HC4067 mux1(22, 23, 24, 25, 26);

MUX74HC4067 *pmux1 = NULL;

void setup()
{


	MUX74HC4067 pmux1(22,23,24,25,26);
  
	Serial.begin(9600);  // Initializes serial port
    // Waits for serial port to connect. Needed for Leonardo only
    while ( !Serial ) ;
	
	// Configures how the SIG pin will be interfaced
	// e.g. The SIG pin connects to PIN 3 on the Arduino,
	//      and PIN 3 is a digital input
//	mux1.signalPin(27, INPUT, DIGITAL);
 pmux1.signalPin(27, INPUT, DIGITAL);
}

// Reads the 16 channels and reports on the serial monitor
// if the corresponding push button is pressed
void loop()
{
	byte data;

	for (byte i = 0; i < 16; ++i)
	{
		// Reads from channel i and returns HIGH or LOW
    data = pmux1->read(i);


		Serial.print("Push button at channel ");
		Serial.print(i);
		Serial.print(" is ");
   Serial.println(data);
		if ( data == HIGH ) Serial.println("not pressed");
		else if ( data == LOW ) Serial.println("pressed");
	}
	Serial.println();
	
	delay(1500);
}

Here is an example of the output from the monitor

Push button at channel 0 is 197
Push button at channel 1 is 197
Push button at channel 2 is 197
Push button at channel 3 is 197
Push button at channel 4 is 197
Push button at channel 5 is 197
Push button at channel 6 is 197
Push button at channel 7 is 197
Push button at channel 8 is 197
Push button at channel 9 is 197
Push button at channel 10 is 197
Push button at channel 11 is 197
Push button at channel 12 is 197
Push button at channel 13 is 197
Push button at channel 14 is 197
Push button at channel 15 is 197

Push button at channel 0 is 227
Push button at channel 1 is 227
Push button at channel 2 is 227
Push button at channel 3 is 227
Push button at channel 4 is 227
Push button at channel 5 is 227
Push button at channel 6 is 227
Push button at channel 7 is 227
Push button at channel 8 is 227
Push button at channel 9 is 227
Push button at channel 10 is 227
Push button at channel 11 is 227
Push button at channel 12 is 227
Push button at channel 13 is 227
Push button at channel 14 is 227
Push button at channel 15 is 227

thanks for all assistance
jase

Have you looked at the tutorial here?

From what I can see, you have set the pins as digital (pmux1.signalPin(27, INPUT, DIGITAL):wink: in which case you should only see a 0 or a 1 or in this case an 8-bit value representing a logic high.

Try setting the pins to analog and see what happens.

here is the linkhttps://github.com/pAIgn10/MUX74HC4067