Skip to content

Commit 8c5c0e2

Browse files
authored
Update python.md
fixed variable names in the example temperature ledSwitch
1 parent 799437d commit 8c5c0e2

File tree

1 file changed

+4
-4
lines changed
  • content/arduino-cloud/01.guides/05.python

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ if __name__ == "__main__":
133133
logging_func()
134134
client = ArduinoCloudClient(device_id=DEVICE_ID, username=DEVICE_ID, password=SECRET_KEY)
135135

136-
client.register("test_value")
137-
client["test_value"] = 20
138-
client.register("test_switch", value=None, on_write=on_switch_changed)
136+
client.register("temperature")
137+
client["temperature"] = 20
138+
client.register("ledSwitch", value=None, on_write=on_switch_changed)
139139

140140
client.start()
141141
```
@@ -168,4 +168,4 @@ For creating dashboards and linking variables, check out the [Dashboard & Widget
168168

169169
- `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.
170170
- `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.
171+
- `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)