Added Embedded-Blink example (works with Wiring based frameworks, like Arduino or Energia)

This commit is contained in:
Ivan Kravets
2014-05-18 23:41:07 +03:00
parent 5bee43540c
commit feac085d7a
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
[env:arduino_pro5v]
platform = atmelavr
board = pro5v
upload_port = /dev/tty.SLAB_USBtoUART
targets = upload
[env:launchpad_msp430g2]
platform = timsp430
board = lpmsp430g2553
[env:launchpad_lm4f120]
platform = titiva
board = lplm4f120h5qr

View File

@@ -0,0 +1,29 @@
/*
Turns ON and OFF the Wiring compatible board LED, with intervals of 1 second (1000 milliseconds)
*/
#ifdef ENERGIA
#include "Energia.h"
#define WLED RED_LED
#else
#include "Arduino.h"
#define WLED 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
#endif
void setup()
{
pinMode(WLED, OUTPUT); // set pin as output
}
void loop()
{
digitalWrite(WLED, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(WLED, LOW); // set the LED off
delay(1000); // wait for a second
}