From f736b252e3af59e785ed3a2229a653f08f990453 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 29 Nov 2016 21:00:57 +0700 Subject: [PATCH] add blink example --- .gitignore | 6 +++ .../Hardware/GPIO/blink/blink.ino | 32 ++++++++++++++ .../adafruit_placeholder.h | 42 +++++++++++++++++++ .../library.properties | 9 ++++ 4 files changed, 89 insertions(+) create mode 100644 libraries/AdafruitFeather52Examples/Hardware/GPIO/blink/blink.ino create mode 100755 libraries/AdafruitFeather52Examples/adafruit_placeholder.h create mode 100644 libraries/AdafruitFeather52Examples/library.properties diff --git a/.gitignore b/.gitignore index 5458eda3..b13f2b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,9 @@ # Executables *.out *.app + +*.pyc +/tools/nrfutil-0.5.2/build/ +/tools/nrfutil-0.5.2/dist/ +/tools/nrfutil-0.5.2/nrfutil.egg-info/ +/tools/.idea/ diff --git a/libraries/AdafruitFeather52Examples/Hardware/GPIO/blink/blink.ino b/libraries/AdafruitFeather52Examples/Hardware/GPIO/blink/blink.ino new file mode 100644 index 00000000..35a06c2e --- /dev/null +++ b/libraries/AdafruitFeather52Examples/Hardware/GPIO/blink/blink.ino @@ -0,0 +1,32 @@ +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + + Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO + it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN takes care + of use the correct LED pin whatever is the board used. + If you want to know what pin the on-board LED is connected to on your Arduino model, check + the Technical Specs of your board at https://www.arduino.cc/en/Main/Products + + This example code is in the public domain. + + modified 8 May 2014 + by Scott Fitzgerald + + modified 2 Sep 2016 + by Arturo Guadalupi +*/ + +// the setup function runs once when you press reset or power the board +void setup() { + // initialize digital pin LED_BUILTIN as an output. + pinMode(LED_BUILTIN, OUTPUT); +} + +// the loop function runs over and over again forever +void loop() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(1000); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(1000); // wait for a second +} diff --git a/libraries/AdafruitFeather52Examples/adafruit_placeholder.h b/libraries/AdafruitFeather52Examples/adafruit_placeholder.h new file mode 100755 index 00000000..f76d9a0e --- /dev/null +++ b/libraries/AdafruitFeather52Examples/adafruit_placeholder.h @@ -0,0 +1,42 @@ +/**************************************************************************/ +/*! + @file adafruit_placeholder.h + @author ktown + + @section LICENSE + + Software License Agreement (BSD License) + + Copyright (c) 2016, Adafruit Industries (adafruit.com) + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/**************************************************************************/ + +#ifndef _ADAFRUIT_PLACEHOLDER_H_ +#define _ADAFRUIT_PLACEHOLDER_H_ + +// This file is required to make the examples show up in the Arduino IDE + +#endif /* _ADAFRUIT_PLACEHOLDER_H_ */ diff --git a/libraries/AdafruitFeather52Examples/library.properties b/libraries/AdafruitFeather52Examples/library.properties new file mode 100644 index 00000000..9b070238 --- /dev/null +++ b/libraries/AdafruitFeather52Examples/library.properties @@ -0,0 +1,9 @@ +name=Adafruit Feather52 Examples +version=0.1.0 +author=Adafruit +maintainer=Adafruit +sentence=Adafruit Bluefruit Feather52 Examples +paragraph=Collection of examples for Bluefruit Feather52 Board +category=Communication +url=http://www.adafruit.com/ +architectures=nRF52