Question: use C language Assignment If Switch #1 is pressed, light up LED #1, else turn LED #1 off If Switch #2 is pressed, display Light
use C language
Assignment
If Switch #1 is pressed, light up LED #1, else turn LED #1 off
If Switch #2 is pressed, display Light Sensor percentage on 7-Segment LED Display
Note that maximum light sensor value is 4096, calculate the percent first, then display on LED Display
LED Display can only display 2 digits
If Switch #3 is pressed, display temperature in Fahrenheit on 7-Segment LED Display
If Switch #4 is pressed, display Acceleration Sensor's X-Axis percentage on 7-Segment LED Display
Note that minimum value is -1024 and maximum value is +1024.
You can add 1024 to this value, then calculate percentage by ((X-Axis+1024)/ 2048) * 100
The points for this assignment depends on how much you add to the program. For example, you can take advantage of the acceleration sensor's Y and Z axis and make the board more interactive. If you have a remote control with you, you can even take advantage of reading IR code received by the board, and light up some LEDs.
Have fun! and play around with Board IO. Your projects depend on the creativity using these boards.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
