Hello,
I was doing some code with PWM on led. My digispark suddenly stopped working.
It gives me the following error immediatly after pluging in the USB digispark in the computer :
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 1.11
> Available space for user applications: 6330 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 99 page size: 64
> Erase function sleep duration: 792ms
parsing: 50% complete
> Erasing the memory ...
erasing: 55% complete
erasing: 60% complete
erasing: 65% complete
> Starting to upload ...
writing: 70% complete
writing: 75% complete
writing: 80% complete
> Starting the user app ...
>> Run error -1 has occured ...
>> Please unplug the device and restart the program.
Here is my code
void setup() {
pinMode(1, OUTPUT);
TCCR0B = TCCR0B & 0b11111000 | 0b010 ;
pinMode(0, INPUT);
}
void loop() {
int in = 0;
int out = 0;
int Valeurs[] = {5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 18, 19, 21, 23, 25, 27, 29, 31, 34, 36, 38, 41, 44, 46, 49, 52, 55, 58, 61, 64, 67, 71, 74, 77, 81, 85, 88, 92, 96, 100, 104, 108, 112, 117, 121, 125, 130, 135, 139, 144, 149, 154, 159, 164, 169, 174, 180, 185, 190, 196, 202, 207, 213, 219, 225, 231, 237, 243, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 243, 237, 231, 225, 220, 214, 209, 203, 198, 193, 188, 183, 178, 174, 169, 165, 160, 156, 152, 148, 144, 140, 136, 133, 129, 125, 122, 119, 115, 112, 109, 106, 103, 100, 97, 95, 92, 89, 87, 84, 82, 79, 77, 75, 73, 71, 68, 66, 64, 62, 61, 59, 57, 55, 53, 52, 50, 49, 47, 45, 44, 43, 41, 40, 39, 37, 36, 35, 34, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 23, 22, 21, 20, 19, 19, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5};
analogWrite(1, 5);
while (1) {
for (in = 0; in < 250; in = in + 1)
{
out = Valeurs[in];
analogWrite(1, out);
delay(100);
}
}
}
I tried to uninstall-install the USB drivers, other USB port, restart the computer, tried the Start led blinking program
Still the same... Did i brick the bootloader ?
Thanks for your help
Joseph