Skip to content

Commit 4d2ce54

Browse files
Revise MicroPython Arduino Cloud tutorial content
Replace CLOUD_PASSWORD to SECRET_KEY to maintain consistent variable name across code examples.
1 parent 6c5e225 commit 4d2ce54

File tree

1 file changed

+5
-4
lines changed
  • content/arduino-cloud/01.guides/04.micropython

1 file changed

+5
-4
lines changed

content/arduino-cloud/01.guides/04.micropython/content.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ During the [device configuration](#thing--device-configuration), you obtained a
100100
WIFI_SSID = "myNetwork" # Network SSID
101101
WIFI_PASSWORD = "passwordForWiFi" # Network key
102102
DEVICE_ID = b"ef77wer88-0432-4574-85e1-54e3d5cac861"
103-
CLOUD_PASSWORD = b"TQHFHEKKKLSYMPB1OZLF"
103+
SECRET_KEY = b"TQHFHEKKKLSYMPB1OZLF"
104104
```
105105

106106
In a MicroPython editor, you can create this file, and save it on your board running MicroPython.
@@ -238,7 +238,7 @@ from arduino_iot_cloud import ArduinoCloudClient
238238
from secrets import WIFI_SSID
239239
from secrets import WIFI_PASSWORD
240240
from secrets import DEVICE_ID
241-
from secrets import CLOUD_PASSWORD
241+
from secrets import SECRET_KEY
242242

243243
led = Pin("LED_BUILTIN", Pin.OUT) # Configure the desired LED pin as an output.
244244

@@ -279,7 +279,7 @@ if __name__ == "__main__":
279279
# Create a client object to connect to the Arduino Cloud.
280280
# For MicroPython, the key and cert files must be stored in DER format on the filesystem.
281281
# Alternatively, a username and password can be used to authenticate:
282-
client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=CLOUD_PASSWORD)
282+
client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=SECRET_KEY)
283283

284284
# Register Cloud objects.
285285
# Note: The following objects must be created first in the dashboard and linked to the device.
@@ -504,7 +504,7 @@ if __name__ == "__main__":
504504

505505
# For MicroPython, the key and cert files must be stored in DER format on the filesystem.
506506
# Alternatively, a username and password can be used to authenticate:
507-
client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=CLOUD_PASSWORD)
507+
client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=SECRET_KEY)
508508
client.register(ColoredLight("light", swi=True, on_write=on_colored_light_changed))
509509

510510
# Start the Arduino Cloud client.
@@ -524,3 +524,4 @@ If the code is not working, there are some common issues we can troubleshoot:
524524
## Conclusion
525525

526526
This tutorial has guided you through the process of connecting your Arduino device to the Arduino Cloud using MicroPython. You learned how to install the necessary library, set up your device, and control an LED via the Arduino Cloud. This opens up possibilities for more complex applications, as you can control and monitor your Arduino device remotely.
527+

0 commit comments

Comments
 (0)