File tree 4 files changed +13
-13
lines changed
PyPortal_AdafruitIO_Logger
PyPortal_Smart_Thermometer
4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 20
20
# Import NeoPixel Library
21
21
import neopixel
22
22
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
25
25
26
26
# Import ADT7410 Library
27
27
import adafruit_adt7410
51
51
ADAFRUIT_IO_USER = secrets ['aio_username' ]
52
52
ADAFRUIT_IO_KEY = secrets ['aio_key' ]
53
53
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 )
56
56
57
57
try :
58
58
# Get the 'temperature' feed from Adafruit IO
Original file line number Diff line number Diff line change 16
16
17
17
from adafruit_esp32spi import adafruit_esp32spi , adafruit_esp32spi_wifimanager
18
18
import neopixel
19
- from adafruit_io .adafruit_io import RESTClient
19
+ from adafruit_io .adafruit_io import IO_HTTP
20
20
21
21
# Get wifi details and more from a secrets.py file
22
22
try :
74
74
aio_username = secrets ['aio_username' ]
75
75
aio_key = secrets ['aio_key' ]
76
76
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 )
79
79
80
80
# Get the weight feed from IO
81
81
weight_feed = io .get_feed ('weight' )
Original file line number Diff line number Diff line change 15
15
import adafruit_adt7410
16
16
17
17
from 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
19
19
20
20
# thermometer graphics helper
21
21
import thermometer_helper
49
49
raise KeyError ('To use this code, you need to include your Adafruit IO username \
50
50
and password in a secrets.py file on the CIRCUITPY drive.' )
51
51
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 )
54
54
55
55
# Get the temperature feed from Adafruit IO
56
56
temperature_feed = io .get_feed ('temperature' )
Original file line number Diff line number Diff line change 15
15
from digitalio import DigitalInOut
16
16
17
17
from 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
19
19
20
20
# sensor libs
21
21
import adafruit_veml6075
56
56
ADAFRUIT_IO_USER = secrets ['aio_username' ]
57
57
ADAFRUIT_IO_KEY = secrets ['aio_key' ]
58
58
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 )
61
61
62
62
# create an i2c object
63
63
i2c = busio .I2C (board .SCL , board .SDA )
You can’t perform that action at this time.
0 commit comments