Update Wiring example according to Get-Started on home page

This commit is contained in:
Ivan Kravets committed 2015-12-26 20:08:50 +02:00
1 parent 9312ca7f0d
commit f7311eb94d
2 files changed
+28 -27

No files matched your search

+20 -16
View File
@@ -1,21 +1,25 @@
#ifdef ENERGIA
#include "Energia.h"
#else
#include "Arduino.h"
#endif
/*
* Blink
* Turns on an LED on for one second,
* then off for one second, repeatedly.
*/
#ifndef LED_PIN
// Most Arduino boards already have a LED attached to pin 13 on the board itself
#define LED_PIN 13
#endif
#include "Arduino.h"
void setup() {
pinMode(LED_PIN, OUTPUT); // set pin as output
void setup()
{
// initialize digital pin 13 as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
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
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// wait for a second
delay(1000);
}