PA Designer Learn 2: LED and Loudness Sensor

This is the second challenge within the Robotics with GoPiGo and Python Curriculum.

Your task is to program your robot to alert a person with a hearing impairment to visiting house guests.

Learn how to use the Loudness Sensor alongside Jupyter Notebooks.

7. Global Variables

When declaring variables within a function, temporary variables that are invisible to the rest of your code will normally be created. Every call to that function generates a new set of temporary variables. If we want to create, read or update a variable that persists across the lifetime of the program and is usable by all the program’s functions, we need to declare that variable to be global.