Skip to content

Commit 5a7e3bd

Browse files
authored
Merge pull request #24 from brentru/add-mqtt-api
Add MQTT Class
2 parents ac455da + 5cc8839 commit 5a7e3bd

19 files changed

+954
-122
lines changed

Diff for: .travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ install:
4343

4444
script:
4545
- pylint adafruit_io/*.py
46-
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
46+
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/http/*.py)
47+
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/mqtt/*.py)
4748
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-adafruit_io --library_location .
4849
- cd docs && sphinx-build -E -W -b html . _build/html && cd ..

Diff for: README.rst

+2-34
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,16 @@ This driver depends on:
2323

2424
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
2525

26-
You'll also need a library to communicate with an ESP32 as a coprocessor using a WiFiManager object. This library supports connecting an ESP32 using either SPI or UART.
27-
28-
* SPI: `Adafruit CircuitPython ESP32SPI <https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI>`_
29-
30-
* UART: `Adafruit CircuitPython ESP_ATcontrol <https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol>`_
31-
3226
Please ensure all dependencies are available on the CircuitPython filesystem.
3327
This is easily achieved by downloading
3428
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
3529

3630
Usage Example
3731
=============
3832

39-
Create an Adafruit IO Client object
40-
41-
.. code-block:: python
42-
43-
io = RESTClient(aio_username, aio_key, wifi)
44-
45-
Sending data to an Adafruit IO feed
46-
47-
.. code-block:: python
48-
49-
io.send_data(feed, data)
50-
51-
Receiving data from an Adafruit IO feed
52-
53-
.. code-block:: python
54-
55-
data = io.receive_data(feed)
56-
57-
Creating a new feed named circuitpython with a description
58-
59-
.. code-block:: python
60-
61-
feed = io.create_new_feed('circuitpython', 'an Adafruit IO CircuitPython feed')
62-
63-
Listing the record of a specified feed:
33+
Usage examples for the Adafruit IO HTTP API are within the examples/http folder.
6434

65-
.. code-block:: python
66-
67-
feed = io.get_feed('circuitpython')
35+
Usage examples for the Adafruit IO MQTT API are within the examples/mqtt folder.
6836

6937
Contributing
7038
============

0 commit comments

Comments
 (0)