Re-group examples

This commit is contained in:
Valeriy Koval
2015-02-23 22:37:12 +02:00
parent b60552e264
commit 6f634e76e7
11 changed files with 90 additions and 99 deletions

View File

@@ -0,0 +1,21 @@
How to buid PlatformIO based project
====================================
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
2. Download `source code with examples <https://github.com/ivankravets/platformio/archive/develop.zip>`_
3. Extract ZIP archive
4. Run these commands:
.. code-block:: bash
# Change directory to example
> cd platformio-develop/examples/atmelavr-and-arduino/adafruit-blink
# Process example project
> platformio run
# Upload firmware
> platformio run --target upload
# Clean build files
> platformio run --target clean

View File

@@ -0,0 +1,33 @@
#
# Project Configuration File
#
# A detailed documentation with the EXAMPLES is located here:
# http://docs.platformio.org/en/latest/projectconf.html
#
# A sign `#` at the beginning of the line indicates a comment
# Comment lines are ignored.
# Simple and base environment
# [env:mybaseenv]
# platform = %INSTALLED_PLATFORM_NAME_HERE%
# framework =
# board =
#
# Automatic targets - enable auto-uploading
# targets = upload
[env:flora8]
platform = atmelavr
framework = arduino
board = flora8
[env:trinket3]
platform = atmelavr
framework = arduino
board = trinket3
[env:protrinket5]
platform = atmelavr
framework = arduino
board = protrinket5

View File

@@ -0,0 +1,33 @@
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
To upload to your Gemma or Trinket:
1) Select the proper board from the Tools->Board Menu
2) Select USBtinyISP from the Tools->Programmer
3) Plug in the Gemma/Trinket, make sure you see the green LED lit
4) For windows, install the USBtiny drivers
5) Press the button on the Gemma/Trinket - verify you see
the red LED pulse. This means it is ready to receive data
6) Click the upload button above within 10 seconds
*/
int led = 1; // blink 'digital' pin 1 - AKA the built in red LED
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}