mirror of
https://github.com/digistump/DigistumpArduino.git
synced 2025-09-17 17:32:25 -07:00
switch to setup for Arduino Boards Manager
This commit is contained in:
17
digistump-avr/libraries/Digispark_Examples/Start/Start.ino
Normal file
17
digistump-avr/libraries/Digispark_Examples/Start/Start.ino
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
// the setup routine runs once when you press reset:
|
||||
void setup() {
|
||||
// initialize the digital pin as an output.
|
||||
pinMode(0, OUTPUT); //LED on Model B
|
||||
pinMode(1, OUTPUT); //LED on Model A or Pro
|
||||
}
|
||||
|
||||
// the loop routine runs over and over again forever:
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user