Skip to content

Commit 9711ee8

Browse files
authored
Use code format for properties
1 parent b3a380b commit 9711ee8

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ client.register(ColoredLight("light", swi=True, on_write=on_colored_light_change
234234

235235
In the callback function for this variable ("on_colored_light_changed") you will receive an object of the same type with populated properties. Those properties depend on the type. For example the `ColoredLight` class has the following properties:
236236

237-
- swi: The on-value of the light switch (True/False)
238-
- hue: The hue value of the color
239-
- sat: The saturation of the color
240-
- bri: The brightness of the color
237+
- `swi`: The on-value of the light switch (True/False)
238+
- `hue`: The hue value of the color
239+
- `sat`: The saturation of the color
240+
- `bri`: The brightness of the color
241241

242242
Once you receive these values from the Cloud you will need to convert them to RGB so you can set the RGB LEDs accordingly. For reasons of brevity we won't go into the code for the color conversion, it is provided however in the full example code further down. Also we need to make all three RGB LEDs available in the code so their value can be set:
243243

0 commit comments

Comments
 (0)