Mood Ring Project example program - TI Unterrichtsmaterialien · Disp ”MY MOOD IS GREEN”4...

3
Draft Texas Instruments September 27, 2017 Mood Ring Project example program for TI-84 Plus CE OS 5.3

Transcript of Mood Ring Project example program - TI Unterrichtsmaterialien · Disp ”MY MOOD IS GREEN”4...

Page 1: Mood Ring Project example program - TI Unterrichtsmaterialien · Disp ”MY MOOD IS GREEN”4 EndIf4 If T>27 4 Then Send "SET COLOR 0 0 255”4 Disp ”MY MOOD IS BLUE”4 End End$

Draft Texas Instruments September 27, 2017

Mood Ring Project example program

for TI-84 Plus CE OS 5.3

Page 2: Mood Ring Project example program - TI Unterrichtsmaterialien · Disp ”MY MOOD IS GREEN”4 EndIf4 If T>27 4 Then Send "SET COLOR 0 0 255”4 Disp ”MY MOOD IS BLUE”4 End End$

Draft Texas Instruments September 27, 2017

Background: Example Program Send "CONNECT TEMPERATURE 1 TO IN 1 AS NTC”4“Connect Temperature sensor #1 to Input port #1”44For(C,1,30)4“For loop repeats 30 times”4Send("READ TEMPERATURE 1”)4“Reads the value for Temperature sensor #1”4Get(T)4Disp T4Wait 14“Gets to variable d then displays the value of T, then Waits 1 second”4If T<26 4“Compares values of variable d to determine and show mood”4Then4Send "SET COLOR 255 0 0”4Disp ”MY MOOD IS RED”4End4If T≥26 and T<27 4Then4Send "SET COLOR 0 255 0”4Disp ”MY MOOD IS GREEN”4EndIf4If T>27 4Then4Send "SET COLOR 0 0 255”4Disp ”MY MOOD IS BLUE”4End4End$4Send "SET COLOR 0 0 0”4“Turns the COLOR OFF”4

Additional Challenges •  Add more than three moods. •  Add variables and logic so that the

program will automatically adapt to each person’s temperature range.

•  Store the temperatures values and the time to list variables. Display a plot of time vs. temperature after the For loop is done.

•  Replace the For loop with a While loop and use getKey with the CLEAR key to exit the loop.

Note: Experiment with temperature values to determine relevant temperature ranges for each person.

Page 3: Mood Ring Project example program - TI Unterrichtsmaterialien · Disp ”MY MOOD IS GREEN”4 EndIf4 If T>27 4 Then Send "SET COLOR 0 0 255”4 Disp ”MY MOOD IS BLUE”4 End End$

Draft Texas Instruments September 27, 2017

Background: Mood Ring Project