adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

Add create_and_get_feed function #81

Closed kattni closed 2 years ago

kattni commented 2 years ago

Adds a create_and_get_feed function to the library that attempts to get the feed, and if the feed does not exist, it creates and then gets the feed. Eliminates the need for the try/except in examples that try to create a feed.

Included an example of how it might be used, using the CPU temperature, which works on most CP-compatible boards.

kattni commented 2 years ago

@jerryneedell @brentru Thanks so much!