Finch Assignment 11 - Light sensor
Light: There are two light sensors present on the robot. These sensors can detect the levels of brightness (or darkness). These can be used to detect variations in ambience light in a room.
Light Sensing
Light – returns the left and right light sensor readings, values range from 0.0 (dark) to 1.0 (bright).
Usage: left_light_sensor, right_light_sensor = finch.light()
To see what the sensors are reading in ambient light, go to the FinchPython folder and run testfinchfunctions.
Assignment 11:
Program the Finch to move when the room lights are switched on, and stop when they are off.
You will need to use conditional (if) statements and while loops.
To turn it in, look at the instructions below:
- Go to Google Drive
- Open the Class Program folder in 'Shared with me'
- Open your class folder and assignment folder
- Click on the "New" button on the top left
- Upload the program from your computer
.
Write a Reflection on what you have learned.
|