Skip to content

Fix typo in Cloud / MicroPython tutorial #1791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions content/arduino-cloud/01.guides/04.micropython/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Next step is to create some Cloud variables, which we will later interact with v
1. While in Thing configuration, click on **"Add Variable"** which will open a new window.
2. Name your variable `led` and select it to be of an `boolean` type.
3. Click on **"Add Variable"** at the bottom of the window.
4. Create another variable, name it `ledSwitch` and select it to be `int` type.
4. Create another variable, name it `ledSwitch` and select it to be `boolean` type.

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

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

## Conclusion

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.
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.