Reorganise IDE examples
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
#include "Arduino.h"
|
||||
/*
|
||||
Blink
|
||||
Turns on an LED on for one second, then off for one second, repeatedly.
|
||||
|
||||
This example code is in the public domain.
|
||||
*/
|
||||
|
||||
int led = 1; // blink 'digital' pin 1 - AKA the built in red LED
|
||||
|
||||
// the setup routine runs once when you press reset:
|
||||
// Most Arduino boards already have a LED attached to pin 13 on the board itself
|
||||
#define LED_PIN 13
|
||||
|
||||
void setup() {
|
||||
// initialize the digital pin as an output.
|
||||
pinMode(led, OUTPUT);
|
||||
|
||||
pinMode(LED_PIN, OUTPUT); // set pin as output
|
||||
}
|
||||
|
||||
// the loop routine runs over and over again forever:
|
||||
void loop() {
|
||||
digitalWrite(led, HIGH);
|
||||
delay(1000);
|
||||
digitalWrite(led, LOW);
|
||||
delay(1000);
|
||||
digitalWrite(LED_PIN, HIGH); // set the LED on
|
||||
delay(1000); // wait for a second
|
||||
digitalWrite(LED_PIN, LOW); // set the LED off
|
||||
delay(1000); // wait for a second
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user