Skip to content

Commit 2a4a1b2

Browse files
committed
examples: Update examples to use the new class names.
1 parent a496c80 commit 2a4a1b2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def on_switch_changed(client, value):
1414
# 1. Create a client object, which is used to connect to the IoT cloud and link local
1515
# objects to cloud objects. Note a username and password can be used for basic authentication
1616
# on both CPython and MicroPython. For more advanced authentication methods, please see the examples.
17-
client = AIOTClient(device_id=b"DEVICE_ID", username=b"DEVICE_ID", password=b"SECRET_KEY")
17+
client = ArduinoCloudClient(device_id=b"DEVICE_ID", username=b"DEVICE_ID", password=b"SECRET_KEY")
1818

1919
# 2. Register cloud objects.
2020
# Note: The following objects must be created first in the dashboard and linked to the device.

examples/example.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import time
55
import logging
66
from time import strftime
7-
from arduino_iot_cloud import AIOTClient
7+
from arduino_iot_cloud import ArduinoCloudClient
88
from arduino_iot_cloud import Location
99
from arduino_iot_cloud import Schedule
1010
from arduino_iot_cloud import ColoredLight
@@ -59,8 +59,8 @@ def user_task(client):
5959
# To use a secure element, set the token's "pin" and URI in "keyfile" and "certfile", and
6060
# the CA certificate (if any) in "ssl_params". Alternatively, a username and password can
6161
# be used to authenticate, for example:
62-
# client = AIOTClient(device_id=b"DEVICE_ID", username=b"DEVICE_ID", password=b"SECRET_KEY")
63-
client = AIOTClient(
62+
# client = ArduinoCloudClient(device_id=b"DEVICE_ID", username=b"DEVICE_ID", password=b"SECRET_KEY")
63+
client = ArduinoCloudClient(
6464
device_id=DEVICE_ID,
6565
ssl_params={
6666
"pin": "1234",

examples/micropython.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import network
77
import logging
88
from time import strftime
9-
from arduino_iot_cloud import AIOTClient
9+
from arduino_iot_cloud import ArduinoCloudClient
1010
from arduino_iot_cloud import Location
1111
from arduino_iot_cloud import Schedule
1212
from arduino_iot_cloud import ColoredLight
@@ -68,8 +68,8 @@ def wifi_connect():
6868
# Create a client object to connect to the Arduino IoT cloud.
6969
# For MicroPython, the key and cert files must be stored in DER format on the filesystem.
7070
# Alternatively, a username and password can be used to authenticate:
71-
# client = AIOTClient(device_id=b"DEVICE_ID", username=b"DEVICE_ID", password=b"SECRET_KEY")
72-
client = AIOTClient(
71+
# client = ArduinoCloudClient(device_id=b"DEVICE_ID", username=b"DEVICE_ID", password=b"SECRET_KEY")
72+
client = ArduinoCloudClient(
7373
device_id=DEVICE_ID,
7474
ssl_params={
7575
"keyfile": KEY_PATH, "certfile": CERT_PATH, "cadata": CADATA, "cert_reqs": ussl.CERT_REQUIRED

0 commit comments

Comments
 (0)