I am having an issue, only pin 11 will work. Any suggestions would be appreciated! The Arduino is wired to an rgb amplifier but even if its removed I can only analogWrite or digitalWrite to the last pin in the array.
const int ledPin = {
9, 10, 11
};
const int pirPin = 3;
const long wait = 300000;
void setup()
{
pinMode (ledPin [0,1,2], OUTPUT);
pinMode (pirPin, INPUT);
digitalWrite (ledPin [0,1,2], LOW);
}
void loop()
{
if (digitalRead(pirPin)== HIGH)
{
analogWrite (ledPin [0,1,2], 200);
}
else
{
digitalWrite (ledPin [0,1,2], HIGH);
}
}