Skip to content

Commit 45c351f

Browse files
authored
Fix typo
1 parent 51683b2 commit 45c351f

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

Diff for: content/arduino-cloud/01.guides/04.micropython/content.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Next step is to create some Cloud variables, which we will later interact with v
6161
1. While in Thing configuration, click on **"Add Variable"** which will open a new window.
6262
2. Name your variable `led` and select it to be of an `boolean` type.
6363
3. Click on **"Add Variable"** at the bottom of the window.
64-
4. Create another variable, name it `ledSwitch` and select it to be `int` type.
64+
4. Create another variable, name it `ledSwitch` and select it to be `boolean` type.
6565

6666
You should now have **two variables**:
6767
- `led` - boolean
@@ -153,6 +153,8 @@ led = Pin("LEDB", Pin.OUT) # Configure the desired LED pin as an output.
153153
def on_switch_changed(client, value):
154154
# Toggles the hardware LED on or off.
155155
led.value(not value)
156+
# Depending on the board you use you may need to use "led.value(value)" instead
157+
# so that the LED's state reflects correctly the boolean value.
156158

157159
# Sets the value of the Cloud variable "led" to the current state of the LED
158160
# and thus mirrors the hardware state in the Cloud.
@@ -223,4 +225,4 @@ If the code is not working, there are some common issues we can troubleshoot:
223225

224226
## Conclusion
225227

226-
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.
228+
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.

0 commit comments

Comments
 (0)