Still doesn't work, tired it with Max/MSP and the Arduino IDE serial monitor. I can see the RX led blinking but the pins won't go high.
int pinCount = 12;
int digiPins[] = {
2,3,4,5,6,7,8,9,10,11,12,13};
int thisPin;
void setup() {
Serial.begin(9600);
for (int thisPin = 0; thisPin < pinCount; thisPin++){
pinMode(digiPins[thisPin], OUTPUT);
}
}
void loop() {
if (Serial.available() > 0){
// read the byte, convert from ASCII character '5' for example to 0x05, check ASCIItable.com for the characters
thisPin = Serial.read() - 48; // subtract 48 if pins are 0-9.
Serial.println(thisPin);
digitalWrite (digiPins[thisPin], HIGH); // set the pin high
delay (1000); // hold it high for 1/10th of a second?
digitalWrite (digiPins[thisPin], LOW); // and back low.
}
delay(1);
}