How random LEDs in Mux shield II ?

I am wondering if anyone may be able to help me..
I am fairly new to programming and I have been stuck.
My problem is that I can't random LEDs which are connected in Mux shield I m a litlle bit confused with Mux Shield ii code.

Anyone knows what could be going on? Thanks!

Post the code that you are confused with and explain what confuses you and we may be able to help.

Post links to any libraries you are using, too.

The code is:
long randNumber ;
int led = 13;
int led = 12;
int led = 11;
int led = 10;
int led = 9;
void setup () {
Serial.begin (9600);
pinMode (led13, OUTPUT) ;
pinMode (led12, OUTPUT) ;
pinMode (led11, OUTPUT) ;
pinMode (led10, OUTPUT) ;
pinMode (led9, OUTPUT) ;
}
void loop () {
randNumber = random (9,14) ;
Serial.println (randNumber) ;
digitalWrite (randNumber, HIGH);
delay (1000);
digitalWrite (randNumber,LOW);
delay (1000);
}

But I would like to connect more LEDs to the Mux shield II not to Arduino
Can you help me?

Can you help me?

Without a link to the shield? Doesn't seem likely.

There is a library and a user guide on that page. What have you tried?

#include <MuxShield.h>

MuxShield muxShield;
long randNumber;

void setup() {

Serial.begin(9600);
muxShield.digitalWriteMS(2,2,DIGITAL_OUT);
muxShield.digitalWriteMS(2,3,DIGITAL_OUT);

}

void loop() {

randNumber = random (2,5);
Serial.println (randNumber);
digitalWrite(randNumber, HIGH);
delay (1000);
digitalWrite(randNumber, LOW);
delay (1000);
}

randNumber = random (2,5);

You need a long to hold a value between 2 and 4?

#include <MuxShield.h>

MuxShield muxShield;

Include the library, and create an instance of the class. Then, forget that it exists. I’m pretty sure that that is NOT going to work.

LEt me explain what exactly i want to do.The finall project is to connenct 15 Leds in Mux shieldII and turn them on and off by random. Is it possible?

This is a wild guess, but does the shield library come with any examples ?

OK, I admit it, I looked...

ok!!I found it!!
The right code is:

#include <MuxShield.h>

MuxShield muxShield;
long randNumber;

void setup()
{

muxShield.setMode(2,DIGITAL_OUT);
Serial.begin(9600);

}

void loop() {

randNumber = random (2,5);
Serial.println (randNumber);
muxShield.digitalWriteMS(2,randNumber, HIGH);

delay (1000);
muxShield.digitalWriteMS(2,randNumber, LOW);
delay (1000);
}