Part 3: Welcome TI-Innovator – Playing with RGB colors

  • Instructions - How you can select LED color?
  • Showing pink colour:

    TI-Basic Code

    Send "SET COLOR 255 50 60 TIME 3"

    Where 255 is red, 50 is green, 60 is blue and 3 is time.

    Write the code and test that it is working right.

    N_aytt_okuva 2017-03-19 kello 15.04.58

  • Exercise - Question & Answer App

    Your work

    Write a program that it ask questions and then it gives red (Wrong answer) or green (Right answer) light and also gives sound signal.

     

    You may need

    • Request command 
    • eval command
    • If...Else statements

     

  • Solutions

    TI-Basic Code

    Request "3+2*3 = ",answer
    If answer=9 Then
     Send "SET SOUND 200 TIME 2"
     Send "SET COLOR 10 255 10 TIME 2"
    Else
     Send "SET SOUND 900 TIME 2"
      Send "SET COLOR 255 10 10 TIME 2"
    EndIf

    Request "125/5",answer
    If answer=25 Then
     Send "SET SOUND 200 TIME 2"
     Send "SET COLOR 10 255 10 TIME 2"
    Else
     Send "SET SOUND 900 TIME 2"
     Send "SET COLOR 255 10 10 TIME 2"
    EndIf

    Notice: You can't copy-paste it because it includes HTML formattings