Skip to content

Commit aabe552

Browse files
authored
Adding in RTD to Main Branch (#35)
* rtd add (#32) * Update conf.py * RTD Fixes (#33) * adding in rtd from test branch * rtd fixes for main branch
1 parent 63a30e0 commit aabe552

File tree

9 files changed

+378
-144
lines changed

9 files changed

+378
-144
lines changed

README.md

Lines changed: 5 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,16 @@
11
# Adafruit IO Arduino Library
22

3-
This library provides a simple device independent interface for interacting with [Adafruit IO](https://io.adafruit.com) using Arduino.
4-
It allows you to switch beween WiFi (ESP8266, M0 WINC1500, & WICED), Cellular (32u4 FONA), and Ethernet (Ethernet FeatherWing)
5-
with only a two line change in your sketch.
3+
[![Documentation Status](https://readthedocs.org/projects/adafruit-io-arduino/badge/?version=latest)](https://adafruit-io-arduino.readthedocs.io/en/latest/) [![Build Status](https://travis-ci.org/adafruit/Adafruit_IO_Arduino.svg?branch=master)](https://travis-ci.org/adafruit/Adafruit_IO_Arduino) [![Discord](https://img.shields.io/discord/327254708534116352.svg)](https://discord.gg/nBQh6qu)
64

7-
## Dependencies
85

9-
This library requires the latest version of the [Arduino IDE](https://www.arduino.cc/en/Main/Software) (tested with v1.6.10).
6+
This library provides a simple device independent interface for interacting with [Adafruit IO](https://io.adafruit.com) using Arduino. It allows you to switch between WiFi (ESP8266, M0 WINC1500, & WICED), Cellular (32u4 FONA), and Ethernet (Ethernet FeatherWing)
107

11-
### Adafruit Feather HUZZAH ESP8266 & Adafruit HUZZAH ESP8266 Breakout
128

13-
* Latest version of the [ESP8266 Arduino Core](https://github.com/esp8266/Arduino#installing-with-boards-manager)
14-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
15-
* Latest version of the [Arduino HTTP Client Library](https://github.com/arduino-libraries/ArduinoHttpClient)
16-
17-
### Adafruit Feather HUZZAH32 (ESP32)
18-
19-
* Latest version of the [ESP32 Arduino Core](https://github.com/espressif/arduino-esp32#using-through-arduino-ide)
20-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
21-
* Latest version of the [Arduino HTTP Client Library](https://github.com/arduino-libraries/ArduinoHttpClient)
22-
23-
### Adafruit Feather M0 WiFi with ATWINC1500
24-
25-
* Latest version of the [Arduino SAMD Arduino Core](https://github.com/arduino/ArduinoCore-samd)
26-
* Latest version of the [Adafruit SAMD Arduino Core](https://github.com/adafruit/ArduinoCore-samd)
27-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
28-
* Latest version of the [WiFi101 Library](https://github.com/arduino-libraries/WiFi101)
29-
* Latest version of the [Arduino HTTP Client Library](https://github.com/arduino-libraries/ArduinoHttpClient)
30-
31-
You will also need to add the SSL certificate for `io.adafruit.com` using the [guide on the Adafruit Learning System.](https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/updating-ssl-certificates)
32-
33-
### Arduino MKR1000
34-
35-
* Latest version of the [Arduino SAMD Arduino Core](https://github.com/arduino/ArduinoCore-samd)
36-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
37-
* Latest version of the [WiFi101 Library](https://github.com/arduino-libraries/WiFi101)
38-
* Latest version of the [Arduino HTTP Client Library](https://github.com/arduino-libraries/ArduinoHttpClient)
39-
40-
You will also need to add the SSL certificate for `io.adafruit.com` using the MKR1000 SSL utility.
41-
42-
### Adafruit WICED Feather WiFi
43-
44-
* Latest version of the [Adafruit WICED Arduino Core](https://github.com/adafruit/Adafruit_WICED_Arduino)
45-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
46-
* Latest version of the [Arduino HTTP Client Library](https://github.com/arduino-libraries/ArduinoHttpClient)
47-
48-
### Adafruit Feather 32u4 FONA
49-
50-
* Latest version of the [Adafruit AVR Arduino Core](https://github.com/adafruit/Adafruit_Arduino_Boards)
51-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
52-
* Latest version of the [Adafruit FONA Library](https://github.com/adafruit/Adafruit_FONA)
53-
54-
### Adafruit Ethernet FeatherWing
55-
56-
The Ethernet FeatherWing will also require a 32u4, M0, or ESP8266 based Feather. Any Arduino cores
57-
required by the host Feather board will also be required.
58-
59-
* Latest version of the [Adafruit Ethernet2 Library](https://github.com/adafruit/Ethernet2)
60-
* Latest version of the [Adafruit MQTT Library](https://github.com/adafruit/Adafruit_MQTT_Library)
61-
* Latest version of the [Arduino HTTP Client Library](https://github.com/arduino-libraries/ArduinoHttpClient)
62-
63-
## Usage
64-
65-
The included examples sketches will walk you through all of the features of the library.
66-
They can be used on all platforms, but they default to WiFi. To change between platforms,
67-
you will need to change two lines of code in the `config.h` tab of the example.
68-
It is recommended that you start with one of the Adafruit WiFi feathers before
69-
moving on to cellular or ethernet.
70-
71-
For all examples, you will need to set `IO_USERNAME` and `IO_KEY` in the `config.h` tab.
72-
73-
The following sections demonstrate how to switch between WiFi, cellular, and ethernet.
74-
75-
### WiFi (ESP8266, M0 WINC1500, WICED)
76-
77-
If you are using the included examples, you do not need to change anything for the Adafruit WiFi Feathers.
78-
All WiFi based Feathers (ESP8266, M0 WiFi, WICED) will work with the examples out of the box.
79-
80-
You will need to add your WiFi information to the `WIFI_SSID` and `WIFI_PASS` defines in the `config.h` tab.
81-
82-
### Cellular (32u4 FONA)
83-
84-
For FONA, you will only need to change from the default WiFi constructor to the FONA specific constructor in the `config.h` tab.
85-
The rest of the sketch remains the same.
86-
87-
You will need to comment out these WiFi lines in `config.h`:
88-
89-
```ino
90-
#include "AdafruitIO_WiFi.h"
91-
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
92-
```
93-
and uncomment the FONA lines in `config.h`:
94-
95-
```ino
96-
#include "AdafruitIO_FONA.h"
97-
AdafruitIO_FONA io(IO_USERNAME, IO_KEY);
98-
```
99-
100-
If your carrier requires APN info, you can set it by adding a call to `io.setAPN()` after `io.connect()` in the `setup()` function of the sketch.
101-
102-
```ino
103-
void setup() {
104-
105-
// start the serial connection
106-
Serial.begin(115200);
107-
108-
// connect to io.adafruit.com
109-
io.connect();
110-
111-
io.setAPN(F("your_apn"), F("your_apn_user"), F("your_apn_pass"));
112-
113-
}
114-
```
115-
116-
### Ethernet (Ethernet FeatherWing)
117-
118-
For Ethernet, you will only need to change from the default WiFi constructor to the Ethernet specific constructor in the `config.h` tab.
119-
The rest of the sketch remains the same.
120-
121-
You will need to comment out these WiFi lines in `config.h`:
122-
123-
```ino
124-
#include "AdafruitIO_WiFi.h"
125-
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
126-
```
127-
128-
and uncomment the Ethernet lines in `config.h`:
129-
130-
```ino
131-
#include "AdafruitIO_Ethernet.h"
132-
AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
133-
```
134-
135-
## Compatibility
136-
137-
Last test with `v2.0.0` on 08/10/2016.
138-
139-
Example | ESP8266 | M0 WINC1500 | WICED | FONA 32u4 | Ethernet* | MKR1000 |
140-
------------------ | :----------: | :----------: | :---------: | :---------: | :--------: | :--------: |
141-
00_publish | ✓ | ✓ | ✓ | ✓ | ✓ | ? |
142-
01_subscribe | ✓ | ✓ | ✓ | ✓ | ✓ | ? |
143-
02_pubsub | ✓ | ✓ | ✓ | ✓ | ✓ | ? |
144-
03_multiple_feeds | ✓ | ✓ | ✓ | ✓ | ✓ | ? |
145-
04_location | ✓ | ✓ | ✓ | ✓ | ✓ | ? |
146-
05_type_conversion | ✓ | ✓ | ✓ | ✓ | ✓ | ? |
147-
06_digital_in | ✓ | ✓ | ✓ | ✓ | ? | ? |
148-
149-
*Ethernet FeatherWing tested with Feather M0 Basic Proto
9+
## Documentation
10+
Documentation including installation, configuration and usage for this library is found on [the Adafruit IO Arduino ReadTheDocs pages](https://adafruit-io-arduino.readthedocs.io/en/latest/).
15011

15112
## License
152-
Copyright (c) 2016 [Adafruit Industries](https://adafruit.com). Licensed under the [MIT license](/LICENSE?raw=true).
13+
Copyright (c) 2018 [Adafruit Industries](https://adafruit.com). Licensed under the [MIT license](/LICENSE?raw=true).
15314

15415
[Adafruit](https://adafruit.com) invests time and resources providing this open source code.
15516
Please support Adafruit and open-source hardware by purchasing products from [Adafruit](https://adafruit.com).

docs/_static/favicon.png

697 Bytes
Loading

docs/api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
.. If you created a package, create one automodule per module in the package.
3+
4+
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
5+
.. use this format as the module name: "adafruit_foo.foo"
6+
7+
.. automodule:: adafruit io arduino
8+
:members:

docs/compatibility.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
=============
2+
Compatibility
3+
=============
4+
Last tested with library `v2.7.4` on 06/18/2018 for ESP8266, ESP32 and M0 WiFi Targets
5+
6+
Previously tested on all targets using v2.0.0 on 08/10/2016.
7+
8+
9+
10+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
11+
| Example | ESP8266 | ESP82 | M0 WiFi | WICED | Ethernet* | FONA 32u4 | MKR1000 |
12+
+======================+=========+=======+=========+=======+===========+===========+=========+
13+
| 00_publish ||||||| ? |
14+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
15+
| 01_subscribe ||||||| ? |
16+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
17+
| 02_pubsub ||||||| ? |
18+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
19+
| 03_multiple_feeds ||||||| ? |
20+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
21+
| 04_location ||||||| ? |
22+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
23+
| 05_type_conversion ||||||| ? |
24+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
25+
| 06_digital_in ||||| ? || ? |
26+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
27+
| 07_digital_out ||||| ? || ? |
28+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
29+
| 08_analog_in ||||| ? || ? |
30+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+
31+
| 09_analog_out ||||| ? || ? |
32+
+----------------------+---------+-------+---------+-------+-----------+-----------+---------+

docs/conf.py

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import os
4+
import sys
5+
sys.path.insert(0, os.path.abspath('..'))
6+
7+
# -- General configuration ------------------------------------------------
8+
9+
# Add any Sphinx extension module names here, as strings. They can be
10+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
11+
# ones.
12+
extensions = [
13+
'sphinx.ext.autodoc',
14+
'sphinx.ext.intersphinx',
15+
'sphinx.ext.napoleon',
16+
'sphinx.ext.todo',
17+
]
18+
19+
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
20+
21+
# Add any paths that contain templates here, relative to this directory.
22+
templates_path = ['_templates']
23+
24+
source_suffix = '.rst'
25+
26+
# The master toctree document.
27+
master_doc = 'index'
28+
29+
# General information about the project.
30+
project = u'Adafruit IO Arduino Library'
31+
copyright = u'2018 ToddTreece,abachman,tdicola,jwcooper,ladyada'
32+
author = u'ToddTreece,abachman,tdicola,jwcooper,ladyada'
33+
34+
# The version info for the project you're documenting, acts as replacement for
35+
# |version| and |release|, also used in various other places throughout the
36+
# built documents.
37+
#
38+
# The short X.Y version.
39+
version = u'2.7'
40+
# The full version, including alpha/beta/rc tags.
41+
release = u'2.7.4'
42+
43+
# The language for content autogenerated by Sphinx. Refer to documentation
44+
# for a list of supported languages.
45+
#
46+
# This is also used if you do content translation via gettext catalogs.
47+
# Usually you set "language" from the command line for these cases.
48+
#language = C
49+
50+
# List of patterns, relative to source directory, that match files and
51+
# directories to ignore when looking for source files.
52+
# This patterns also effect to html_static_path and html_extra_path
53+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md']
54+
55+
# The reST default role (used for this markup: `text`) to use for all
56+
# documents.
57+
#
58+
default_role = "any"
59+
60+
# If true, '()' will be appended to :func: etc. cross-reference text.
61+
#
62+
add_function_parentheses = True
63+
64+
# The name of the Pygments (syntax highlighting) style to use.
65+
pygments_style = 'sphinx'
66+
67+
# If true, `todo` and `todoList` produce output, else they produce nothing.
68+
todo_include_todos = False
69+
70+
# If this is True, todo emits a warning for each TODO entries. The default is False.
71+
todo_emit_warnings = True
72+
73+
napoleon_numpy_docstring = False
74+
75+
# -- Options for HTML output ----------------------------------------------
76+
77+
# The theme to use for HTML and HTML Help pages. See the documentation for
78+
# a list of builtin themes.
79+
#
80+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
81+
82+
if not on_rtd: # only import and set the theme if we're building docs locally
83+
try:
84+
import sphinx_rtd_theme
85+
html_theme = 'sphinx_rtd_theme'
86+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
87+
except:
88+
html_theme = 'default'
89+
html_theme_path = ['.']
90+
else:
91+
html_theme_path = ['.']
92+
93+
# Add any paths that contain custom static files (such as style sheets) here,
94+
# relative to this directory. They are copied after the builtin static files,
95+
# so a file named "default.css" will overwrite the builtin "default.css".
96+
html_static_path = ['_static']
97+
98+
# The name of an image file (relative to this directory) to use as a favicon of
99+
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
100+
# pixels large.
101+
#
102+
html_favicon = '_static/favicon.ico'
103+
104+
# Output file base name for HTML help builder.
105+
htmlhelp_basename = 'Adafruit io arduinoLibrarydoc'
106+
107+
# -- Options for LaTeX output ---------------------------------------------
108+
109+
latex_elements = {
110+
# The paper size ('letterpaper' or 'a4paper').
111+
#
112+
# 'papersize': 'letterpaper',
113+
114+
# The font size ('10pt', '11pt' or '12pt').
115+
#
116+
# 'pointsize': '10pt',
117+
118+
# Additional stuff for the LaTeX preamble.
119+
#
120+
# 'preamble': '',
121+
122+
# Latex figure (float) alignment
123+
#
124+
# 'figure_align': 'htbp',
125+
}
126+
127+
# Grouping the document tree into LaTeX files. List of tuples
128+
# (source start file, target name, title,
129+
# author, documentclass [howto, manual, or own class]).
130+
latex_documents = [
131+
(master_doc, 'Adafruit IO ArduinoLibrary.tex', u'Adafruit IO Arduino Library Documentation',
132+
author, 'manual'),
133+
]
134+
135+
# -- Options for manual page output ---------------------------------------
136+
137+
# One entry per manual page. List of tuples
138+
# (source start file, name, description, authors, manual section).
139+
man_pages = [
140+
(master_doc, 'Adafruit IO Arduinolibrary', u'Adafruit IO Arduino Library Documentation',
141+
[author], 1)
142+
]
143+
144+
# -- Options for Texinfo output -------------------------------------------
145+
146+
# Grouping the document tree into Texinfo files. List of tuples
147+
# (source start file, target name, title, author,
148+
# dir menu entry, description, category)
149+
texinfo_documents = [
150+
(master_doc, 'Adafruit IO ArduinoLibrary', u' Adafruit IO Arduino Library Documentation',
151+
author, 'Adafruit IO ArduinoLibrary', 'One line description of project.',
152+
'Miscellaneous'),
153+
]

0 commit comments

Comments
 (0)