Exercise - Nightlight
Your work
Write a program that it measures brightness. If brightness is not high then it turns LED on.
You may need
- For statements
- If...Else statements
Solutions
TI-Basic Code
For n,1,30
Send "READ BRIGHTNESS"
Get a
If a<10 Then
Send "SET LIGHT ON"
Else
Send "SET LIGHT OFF"
EndIf
Wait 0.5
EndFor
Notice: You can't copy-paste it because it includes HTML formattings