Last night I was happily coding away for my LED cube until I tried this one particular animation that seemed to have killed my Arduino. When I power it up, all LEDs flash like the code is supposed to and then it just goes dark. When I try to upload again I get:
stk500_recv(): programmer is not responding
stk500_recv(): programmer is not responding
long Random;
////////////////0 1 2 3 4 5 6 7 8 9 10 11
//int pins[] = {2,3,4,5,6,7,8,9,10,11,12,13};
int pins[] = {2,6,10,3,7,13,4,8,12,5,9,11};
int time = 10;
int time2 = 250;
int time3 = 0;
int time4 = 100;
void setup()
{
pinMode(pins[0], OUTPUT); //2 g
pinMode(pins[1], OUTPUT); //3 3
pinMode(pins[2], OUTPUT); //4 6
pinMode(pins[3], OUTPUT); //5 9
pinMode(pins[4], OUTPUT); //6 g
pinMode(pins[5], OUTPUT); //7 2
pinMode(pins[6], OUTPUT); //8 5
pinMode(pins[7], OUTPUT); //9 8
pinMode(pins[8], OUTPUT); //10 g
pinMode(pins[9], OUTPUT); //11 1
pinMode(pins[10], OUTPUT); //12 4
pinMode(pins[11], OUTPUT); //13 7
//Serial.begin(9600);
}
void loop()
{
//START Moving Walls
digitalWrite(pins[0], LOW);
digitalWrite(pins[1], HIGH);
digitalWrite(pins[2], HIGH);
int c = 3;
while(c<=9)
{
for(int l = 0; l<=2; l++) //Controls which layer is lit
{
for(int i =c; i < i+3; i++)
{
digitalWrite(pins[i], HIGH);
digitalWrite(pins[i], LOW);
}
digitalWrite(pins[l], HIGH); //Increments layer in voltage
if(l != 2)
{
digitalWrite(pins[l+1], LOW);
}
else
{
digitalWrite(pins[0], LOW);
}
}
c = c+3;
delay(time2);
if(c > 9)
{
c=3;
}
}
//END Moving Walls
}
I'm not entirely sure what caused the issue, it was working fine until I uploaded the above sketch and now I can't do anything.
Am I completely screwed and need to reburn the bootloader or is there something I can do? Any idea what my code did?
EDIT: Forgot to add some stuff.
I'm running the latest version of OS X(intel) and the latest Arduino software with a Diecimila. Pin 13 flashes like crazy on boot and stops when I try to upload something, then starts on the next upload. Holding the reset button stops the light until released and then it flickers like mad again.
EDIT 2: I just tried it on Windows and I get a different set of errors.
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51