MuxShield II issue writing channels


I’m using the Mayhem labs MuxShield II (Mux Shield II | Mayhew Labs) with a SparkFun redboard

I’m configuring the shield to use digital outputs. Whenever I write a channel, the other channels get cleared. I’m not quite sure why this is happening.

I’ve adapted the test code below from the MuxShieldDigitalOut example sketch.

At any given point in the loop the only pins that are high (5V) are associated with the channel that was last written to. The expected behavior would be that after the first iteration through the loop Channels 1:3, pins 1:3 would be high.


#include <MuxShield.h>

//Initialize the Mux Shield
MuxShield muxShield;

void setup() {
  // put your setup code here, to run once:
  // initialize serial:

  //Set I/O 1, I/O 2, and I/O 3 as digital outputs


void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("Configuring Channel 1, pins 1,2,3");
  Serial.println("Configuring Channel 2, pins 1,2,3");
  Serial.println("Configuring Channel 3, pins 1,2,3");

Welcome to the forum

Did you get the example code to work before you modified it?

Note that in each for loop they allow 100mS between EACH command.

You may need to do this:

  Serial.println("Setting Channel 1, pins 1,2,3");

I also changed Config to Setting in your serial.print, as you have already configured the I/O in setup.
(Just me being fussy :o)

Tom... :slight_smile: