Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e5c64b2

Browse files
Merge pull request #1506 from arduino/akash73-patch-2
Update python.md
2 parents 3febb13 + d2537fc commit e5c64b2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
337 KB
Loading[フレーム]
336 KB
Loading[フレーム]

‎content/arduino-cloud/01.guides/05.python/python.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def logging_func():
124124
level=logging.INFO,
125125
)
126126

127-
# This function is executed each time the "ledSwitch" variable changes
127+
# This function is executed each time the "test_switch" variable changes
128128
def on_switch_changed(client, value):
129129
print("Switch Pressed! Status is: ", value)
130130

@@ -152,9 +152,11 @@ python cloud_first_test.py
152152

153153
After running the script, you should see in the terminal that we first attempt to connect to the Arduino Cloud. Once connected, we push the variable update for `test_value`. You should now see this value updated in the Thing interface in the Arduino Cloud.
154154

155-
![Value updated in the Arduino Cloud](assets/values.png)
155+
![Value updated in the Arduino Cloud](assets/variable-update.png)
156156

157-
You can test out the `test_switch` variable by creating a dashboard in the Arduino Cloud with a switch widget linked to the variable.
157+
You can test out the `test_switch` variable by creating a dashboard in the Arduino Cloud with a switch widget linked to the variable. Head over to "Dashboards" and create a value widget and a switch widget:
158+
159+
![Control the switch from a dashboard.](assets/dashboard.png)
158160

159161
When flicking the switch, you should see the following command being printed in the terminal:
160162

@@ -168,4 +170,4 @@ For creating dashboards and linking variables, check out the [Dashboard & Widget
168170

169171
- `command not found: python` - encountering this error when running a script indicates that the terminal can't access Python. You can try running `python3`, as some versions of Python requires this.
170172
- `Connection failed 5, retrying after 1.0s` - this error is likely due to an invalid **device ID** or **secret key**.
171-
- `ModuleNotFoundError: No module named '_m2crypto'` - likely if you are running an older version of the library. Try updating the library.
173+
- `ModuleNotFoundError: No module named '_m2crypto'` - likely if you are running an older version of the library. Try updating the library.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /