File tree Expand file tree Collapse file tree
PyPortal_AdafruitIO_Logger
PyPortal_Smart_Thermometer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020# Import NeoPixel Library
2121import neopixel
2222
23- # Import Adafruit IO REST Client
24- from adafruit_io .adafruit_io import RESTClient , AdafruitIO_RequestError
23+ # Import Adafruit IO HTTP Client
24+ from adafruit_io .adafruit_io import IO_HTTP , AdafruitIO_RequestError
2525
2626# Import ADT7410 Library
2727import adafruit_adt7410
5151ADAFRUIT_IO_USER = secrets ['aio_username' ]
5252ADAFRUIT_IO_KEY = secrets ['aio_key' ]
5353
54- # Create an instance of the Adafruit IO REST client
55- io = RESTClient (ADAFRUIT_IO_USER , ADAFRUIT_IO_KEY , wifi )
54+ # Create an instance of the Adafruit IO HTTP client
55+ io = IO_HTTP (ADAFRUIT_IO_USER , ADAFRUIT_IO_KEY , wifi )
5656
5757try :
5858 # Get the 'temperature' feed from Adafruit IO
Original file line number Diff line number Diff line change 1616
1717from adafruit_esp32spi import adafruit_esp32spi , adafruit_esp32spi_wifimanager
1818import neopixel
19- from adafruit_io .adafruit_io import RESTClient
19+ from adafruit_io .adafruit_io import IO_HTTP
2020
2121# Get wifi details and more from a secrets.py file
2222try :
7474aio_username = secrets ['aio_username' ]
7575aio_key = secrets ['aio_key' ]
7676
77- # Create an instance of the Adafruit IO REST client
78- io = RESTClient (aio_username , aio_key , wifi )
77+ # Create an instance of the IO_HTTP client
78+ io = IO_HTTP (aio_username , aio_key , wifi )
7979
8080# Get the weight feed from IO
8181weight_feed = io .get_feed ('weight' )
Original file line number Diff line number Diff line change 1515import adafruit_adt7410
1616
1717from adafruit_esp32spi import adafruit_esp32spi , adafruit_esp32spi_wifimanager
18- from adafruit_io .adafruit_io import RESTClient , AdafruitIO_RequestError
18+ from adafruit_io .adafruit_io import IO_HTTP , AdafruitIO_RequestError
1919
2020# thermometer graphics helper
2121import thermometer_helper
4949 raise KeyError ('To use this code, you need to include your Adafruit IO username \
5050 and password in a secrets.py file on the CIRCUITPY drive.' )
5151
52- # Create an instance of the Adafruit IO REST client
53- io = RESTClient (ADAFRUIT_IO_USER , ADAFRUIT_IO_KEY , wifi )
52+ # Create an instance of the IO_HTTP client
53+ io = IO_HTTP (ADAFRUIT_IO_USER , ADAFRUIT_IO_KEY , wifi )
5454
5555# Get the temperature feed from Adafruit IO
5656temperature_feed = io .get_feed ('temperature' )
Original file line number Diff line number Diff line change 1515from digitalio import DigitalInOut
1616
1717from adafruit_esp32spi import adafruit_esp32spi , adafruit_esp32spi_wifimanager
18- from adafruit_io .adafruit_io import RESTClient , AdafruitIO_RequestError
18+ from adafruit_io .adafruit_io import IO_HTTP , AdafruitIO_RequestError
1919
2020# sensor libs
2121import adafruit_veml6075
5656ADAFRUIT_IO_USER = secrets ['aio_username' ]
5757ADAFRUIT_IO_KEY = secrets ['aio_key' ]
5858
59- # Create an instance of the Adafruit IO REST client
60- io = RESTClient (ADAFRUIT_IO_USER , ADAFRUIT_IO_KEY , wifi )
59+ # Create an instance of the Adafruit IO HTTP client
60+ io = IO_HTTP (ADAFRUIT_IO_USER , ADAFRUIT_IO_KEY , wifi )
6161
6262# create an i2c object
6363i2c = busio .I2C (board .SCL , board .SDA )
You can’t perform that action at this time.
0 commit comments