You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running "-t" for the tutorial, Lesson 3 throws an error from LED module's color setting.
What I Did
Lesson 3: Controlling modules
Now you know how to access individual modules. Let's make an object named
"button" as well for your button module. You know how to do it (You have the
modi object, "bundle").
Perfect. With your button module and led module, we can either get data from
the module or send command to the module.
"pressed" is a property method of a button module which returns whether the
button is pressed or not (i.e. press state).
Check the press state of the button by typing button.pressed
button.pressed
False
Now, see if the same command returns True when pressing the button.
Write below code precisely.
button.pressed
button.pressed
False
Good. Now let's send a command to the led module. Led's rgb is a property or
setter method of an led module.
Let there be light by typing led.rgb = 0, 0, 255
led.rgb = 0, 0, 255
Traceback (most recent call last):
File "D:\Anaconda\envs\pymodi\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Anaconda\envs\pymodi\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Sean Kim\AppData\Roaming\Python\Python36\site-packages\modi_main.py", line 89, in
pymodi_tutor.run_introduction()
File "C:\Users\Sean Kim\AppData\Roaming\Python\Python36\site-packages\modi\util\tutorial_util.py", line 113, in run_introduction
run_selected_lesson()
File "C:\Users\Sean Kim\AppData\Roaming\Python\Python36\site-packages\modi\util\tutorial_util.py", line 213, in run_lesson2
self.run_lesson3()
File "C:\Users\Sean Kim\AppData\Roaming\Python\Python36\site-packages\modi\util\tutorial_util.py", line 273, in run_lesson3
exec(response)
File "", line 1, in
File "C:\Users\Sean Kim\AppData\Roaming\Python\Python36\site-packages\modi\module\output_module\output_module.py", line 98, in set_property
raise ValueError(f"{setter.name} "
ValueError: rgb should be in range 0~100
Expected Behavior
Accept the RGB in range of 0 to 255, then show the right color
System Info
PyMODI version: 1.2.0
Python version: 3.6
Operating System: Windows
You can obtain the pymodi version with:
python -c "import modi"
You can obtain the Python version with:
python --version
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue Description
While running "-t" for the tutorial, Lesson 3 throws an error from LED module's color setting.
What I Did
Now you know how to access individual modules. Let's make an object named
"button" as well for your button module. You know how to do it (You have the
modi object, "bundle").
Perfect. With your button module and led module, we can either get data from
the module or send command to the module.
"pressed" is a property method of a button module which returns whether the
button is pressed or not (i.e. press state).
Check the press state of the button by typing button.pressed
Now, see if the same command returns True when pressing the button.
Write below code precisely.
Good. Now let's send a command to the led module. Led's rgb is a property or
setter method of an led module.
Let there be light by typing led.rgb = 0, 0, 255
Expected Behavior
Accept the RGB in range of 0 to 255, then show the right color
System Info
You can obtain the pymodi version with:
You can obtain the Python version with:
The text was updated successfully, but these errors were encountered: