Created
June 30, 2020 19:30
-
-
Save tomazas/d105101e0f32f64f2d7c44acb94e2e22 to your computer and use it in GitHub Desktop.
Revive Digispark ATTiny85 sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fixes the Digispark board brown out (USB re-enumeration) issue | |
// | |
// 1. Install drivers: https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip | |
// 2. Install Digispark boards: https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json | |
// 3. Choose Tool > Board > Digispark (Default - 16.5mhz) | |
// 4. Upload this sketch | |
// 5. Plugin the board in USB | |
void setup() { | |
// initialize the digital pin as an output. | |
pinMode(0, OUTPUT); //LED on Model B | |
pinMode(1, OUTPUT); //LED on Model A | |
} | |
void loop() { | |
digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level) | |
digitalWrite(1, HIGH); | |
delay(1000); // wait for a second | |
digitalWrite(0, LOW); // turn the LED off by making the voltage LOW | |
digitalWrite(1, LOW); | |
delay(1000); // wait for a second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment