Skip to content

Commit 25df6af

Browse files
committed
add new config.h info to readme
1 parent 0604f66 commit 25df6af

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,33 @@ required by the host Feather board will also be required.
4444

4545
The included examples sketches will walk you through all of the features of the library.
4646
They can be used on all platforms, but they default to WiFi. To change between platforms,
47-
you will need to change two lines of code in the example. It is recommended that you start with
48-
one of the Adafruit WiFi feathers before moving on to Cellular or Ethernet.
47+
you will need to change two lines of code in the `config.h` tab of the example.
48+
It is recommended that you start with one of the Adafruit WiFi feathers before
49+
moving on to cellular or ethernet.
4950

50-
The examples below demonstrate how to switch between platforms.
51+
For all examples, you will need to set `IO_USERNAME` and `IO_KEY` in the `config.h` tab.
52+
53+
The following sections demonstrate how to switch between WiFi, cellular, and ethernet.
5154

5255
### WiFi (ESP8266, M0 WINC1500, WICED)
5356

54-
If you are using the included examples, you do not need to change anything for the Adafruit WiFi Feathers. All WiFi based Feathers (ESP8266, M0 WiFi, WICED) will work with the examples out of the box.
57+
If you are using the included examples, you do not need to change anything for the Adafruit WiFi Feathers.
58+
All WiFi based Feathers (ESP8266, M0 WiFi, WICED) will work with the examples out of the box.
59+
60+
You will need to add your WiFi information to the `WIFI_SSID` and `WIFI_PASS` defines in the `config.h` tab.
5561

5662
### Cellular (32u4 FONA)
5763

58-
For FONA, you will only need to change from the default WiFi constructor to the FONA specific constructor. The rest of the sketch remains the same.
64+
For FONA, you will only need to change from the default WiFi constructor to the FONA specific constructor in the `config.h` tab.
65+
The rest of the sketch remains the same.
5966

60-
You will need to change these lines:
67+
You will need to comment out these WiFi lines in `config.h`:
6168

6269
```ino
6370
#include "AdafruitIO_WiFi.h"
6471
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
6572
```
66-
to this:
73+
and uncomment the FONA lines in `config.h`:
6774
6875
```ino
6976
#include "AdafruitIO_FONA.h"
@@ -88,16 +95,17 @@ void setup() {
8895

8996
### Ethernet (Ethernet FeatherWing)
9097

91-
For Ethernet, you will only need to change from the default WiFi constructor to the Ethernet specific constructor. The rest of the sketch remains the same.
98+
For Ethernet, you will only need to change from the default WiFi constructor to the Ethernet specific constructor in the `config.h` tab.
99+
The rest of the sketch remains the same.
92100

93-
You will need to change these lines:
101+
You will need to comment out these WiFi lines in `config.h`:
94102

95103
```ino
96104
#include "AdafruitIO_WiFi.h"
97105
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
98106
```
99107
100-
to this:
108+
and uncomment the Ethernet lines in `config.h`:
101109
102110
```ino
103111
#include "AdafruitIO_Ethernet.h"

0 commit comments

Comments
 (0)