ports/devel/arduino-mk/files/blink2.pde
Michael Scheidell 20c7644113 Add port devel/arduino-mk: Arduino from the command line
This is a makefile written by Martin Atelier that makes it possible
to build Arduino sketches with gmake. An example sketch and Makefile;
it is installed in share/examples/arduino-mk

PR:		ports/156143
Submitted by:	Craig Leres <leres@ee.lbl.gov> (maintainer)
Approved by:	gabor (mentor, implicit)
Feature safe:	yes
2012-02-23 14:20:36 +00:00

30 lines
457 B
Text

/* @(#) $Id: blink2.pde 18 2012-02-05 20:38:31Z leres $ (XSE) */
/*
* This is a example sketch that blinks the LED like a heartbeat
*/
/* SCK is usually connected to the LED */
#define PIN_LED_OUT SCK
void
setup()
{
pinMode(PIN_LED_OUT, OUTPUT);
}
void
loop()
{
digitalWrite(PIN_LED_OUT, HIGH);
delay(25);
digitalWrite(PIN_LED_OUT, LOW);
delay(50);
digitalWrite(PIN_LED_OUT, HIGH);
delay(25);
digitalWrite(PIN_LED_OUT, LOW);
delay(900);
}