Scripting boolean logic in Python

Conclusion

Time to play!

Now you are ready to make programs for your Controller component in your workspace! Modify your example_mapping.py program and test it against the model.

Challenges

Try to make some different connections between the buttons and lights.

  • When pressing the white button, turn on the red light. If the black button also is activated, instead turn on the green light.

  • When the blue button is pressed, make the yellow light start blinking. Stop blinking when the blue button is pressed again.

  • Make the lights repeatedly switch on/off after each other in a sequence from left to right.

We hope you enjoyed this course. Head over to our Community Forum to join the discussion, get inspiration or support.

Thank you!