Skip to content

Commit e87eed2

Browse files
committed
rename examples
1 parent b8be6bd commit e87eed2

File tree

7 files changed

+44
-117
lines changed

7 files changed

+44
-117
lines changed

examples/basic_publish/basic_publish.ino renamed to examples/adafruitio_01_publish/adafruitio_01_publish.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// Adafruit IO Basic Publish Example
1+
// Adafruit IO Publish Example
2+
//
3+
// Adafruit invests time and resources providing this open source code.
4+
// Please support Adafruit and open source hardware by purchasing
5+
// products from Adafruit!
26
//
37
// Written by Todd Treece for Adafruit Industries
48
// Copyright (c) 2016 Adafruit Industries
@@ -25,7 +29,7 @@
2529
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
2630
// - Feather WICED -> https://www.adafruit.com/products/3056
2731

28-
// set up the wifi client using the supplied ssid & pass:
32+
// set up the wifi client using the supplied ssid & pass
2933
#include "AdafruitIO_WiFi.h"
3034
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
3135

examples/basic_subscribe/basic_subscribe.ino renamed to examples/adafruitio_02_subscribe/adafruitio_02_subscribe.ino

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// Adafruit IO Basic Subscription Example
1+
// Adafruit IO Subscription Example
2+
//
3+
// Adafruit invests time and resources providing this open source code.
4+
// Please support Adafruit and open source hardware by purchasing
5+
// products from Adafruit!
26
//
37
// Written by Todd Treece for Adafruit Industries
48
// Copyright (c) 2016 Adafruit Industries
@@ -19,13 +23,7 @@
1923

2024
/*************************** Client Setup ***********************************/
2125

22-
// The Adafruit IO WiFi client will work with the following boards:
23-
// - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471
24-
// - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821
25-
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
26-
// - Feather WICED -> https://www.adafruit.com/products/3056
27-
28-
// set up the wifi client using the supplied ssid & pass:
26+
// set up the wifi client using the supplied ssid & pass
2927
#include "AdafruitIO_WiFi.h"
3028
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
3129

examples/basic_pubsub/basic_pubsub.ino renamed to examples/adafruitio_03_pubsub/adafruitio_03_pubsub.ino

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
// Adafruit IO Basic Publish & Subscribe Example
1+
// Adafruit IO Publish & Subscribe Example
2+
//
3+
// Adafruit invests time and resources providing this open source code.
4+
// Please support Adafruit and open source hardware by purchasing
5+
// products from Adafruit!
26
//
37
// Written by Todd Treece for Adafruit Industries
48
// Copyright (c) 2016 Adafruit Industries
@@ -19,13 +23,7 @@
1923

2024
/*************************** Client Setup ***********************************/
2125

22-
// The Adafruit IO WiFi client will work with the following boards:
23-
// - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471
24-
// - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821
25-
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
26-
// - Feather WICED -> https://www.adafruit.com/products/3056
27-
28-
// set up the wifi client using the supplied ssid & pass:
26+
// set up the wifi client using the supplied ssid & pass
2927
#include "AdafruitIO_WiFi.h"
3028
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
3129

examples/multiple_feeds/multiple_feeds.ino renamed to examples/adafruitio_04_multiple_feeds/adafruitio_04_multiple_feeds.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Adafruit IO Multiple Feed Example
22
//
3+
// Adafruit invests time and resources providing this open source code.
4+
// Please support Adafruit and open source hardware by purchasing
5+
// products from Adafruit!
6+
//
37
// Written by Todd Treece for Adafruit Industries
48
// Copyright (c) 2016 Adafruit Industries
59
// Licensed under the MIT license.
@@ -18,7 +22,7 @@
1822

1923
/*************************** Client Setup ***********************************/
2024

21-
// set up the wifi client using the supplied ssid & pass:
25+
// set up the wifi client using the supplied ssid & pass
2226
#include "AdafruitIO_WiFi.h"
2327
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2428

examples/location/location.ino renamed to examples/adafruitio_05_location/adafruitio_05_location.ino

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Adafruit IO Location Example
22
//
3+
// Adafruit invests time and resources providing this open source code.
4+
// Please support Adafruit and open source hardware by purchasing
5+
// products from Adafruit!
6+
//
37
// Written by Todd Treece for Adafruit Industries
48
// Copyright (c) 2016 Adafruit Industries
59
// Licensed under the MIT license.
@@ -18,9 +22,9 @@
1822

1923
/*************************** Client Setup ***********************************/
2024

21-
// set up the wifi client using the supplied ssid & pass:
25+
// set up the wifi client using the supplied ssid & pass
2226
#include "AdafruitIO_WiFi.h"
23-
AdafruitIO_WiFi io(WIFI_SSID, WIFI_PASS);
27+
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2428

2529
/************************ Example Starts Here *******************************/
2630

@@ -46,7 +50,7 @@ void setup() {
4650
Serial.print("Connecting to Adafruit IO");
4751

4852
// connect to io.adafruit.com
49-
io.connect(IO_USERNAME, IO_KEY);
53+
io.connect();
5054

5155
// set up a message handler for the location feed.
5256
location->onMessage(handleMessage);
@@ -82,10 +86,10 @@ void loop() {
8286
// 'location' feed on Adafruit IO
8387
location->save(value, lat, lon, ele);
8488

85-
// increment all values (for demo purposes)
89+
// shift all values (for demo purposes)
8690
value += 1;
87-
lat += 0.1;
88-
lon += 0.2;
91+
lat -= 0.01;
92+
lon += 0.02;
8993
ele += 1;
9094

9195
// wait one second (1000 milliseconds == 1 second)

examples/type_conversion/type_conversion.ino renamed to examples/adafruitio_06_type_conversion/adafruitio_06_type_conversion.ino

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Adafruit IO Type Conversion Example
22
//
3+
// Adafruit invests time and resources providing this open source code.
4+
// Please support Adafruit and open source hardware by purchasing
5+
// products from Adafruit!
6+
//
37
// Written by Todd Treece for Adafruit Industries
48
// Copyright (c) 2016 Adafruit Industries
59
// Licensed under the MIT license.
@@ -18,7 +22,7 @@
1822

1923
/*************************** Client Setup ***********************************/
2024

21-
// set up the wifi client using the supplied ssid & pass:
25+
// set up the wifi client using the supplied ssid & pass
2226
#include "AdafruitIO_WiFi.h"
2327
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
2428

@@ -76,8 +80,9 @@ void loop() {
7680

7781
Serial.println("----- sending -----");
7882

79-
// send a different type depending on
80-
// value of the current_type var
83+
// in order to demonstrate sending values
84+
// as different types, we will switch between
85+
// types in a loop using the current_type variable
8186
if(current_type == 0) {
8287
Serial.print("char: ");
8388
Serial.println(char_val);
@@ -130,6 +135,8 @@ void loop() {
130135

131136
}
132137

138+
// this function will demonstrate how to convert
139+
// the received data to each available type.
133140
void handleMessage(AdafruitIO_Data *data) {
134141

135142
// print out the received count value
@@ -139,6 +146,7 @@ void handleMessage(AdafruitIO_Data *data) {
139146
Serial.print("value: ");
140147
Serial.println(data->value());
141148

149+
// get char* value
142150
Serial.print("toChar: ");
143151
Serial.println(data->toChar());
144152

examples/fona/fona.ino

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)