Add Teensy to Wiring Blink example

This commit is contained in:
Ivan Kravets
2015-02-25 00:22:24 +02:00
parent 7a311ff503
commit e90e641941
2 changed files with 24 additions and 39 deletions
+10 -18
View File
@@ -1,27 +1,19 @@
/**
* Copyright (C) Ivan Kravets <me@ikravets.com>
* See LICENSE for details.
*/
/**
Turns ON and OFF the Wiring compatible board LED,
with intervals of 1 second (1000 milliseconds)
*/
#include "Arduino.h"
#ifndef LED_PIN
#define LED_PIN 13 // Most Arduino boards already have a LED attached to pin 13 on the board itself
#ifdef ENERGIA
#include "Energia.h"
#else
#include "Arduino.h"
#endif
#ifndef LED_PIN
// Most Arduino boards already have a LED attached to pin 13 on the board itself
#define LED_PIN 13
#endif
void setup()
{
void setup() {
pinMode(LED_PIN, OUTPUT); // set pin as output
}
void loop()
{
void loop() {
digitalWrite(LED_PIN, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(LED_PIN, LOW); // set the LED off