Part 4: Welcome TI-Innovator – Measurement of brightness

  • Instructions - How you can measure brightness?
  • Send "READ BRIGHTNESS"
    Get a
    Disp a

    Write the code and test that it is working right.

    Näyttökuva 2017-03-19 kello 15.15.18

  • 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