I created a breathing exercise program in TI-Basic.
I'm not sure if there will be speed differences between calcs, but feel free to optimize the code if you wish. You can change W if you want it to be faster or slower, but note that if you make W too small you will end up with a hyperventilating program, which I would strongly advise against.
Code:
It runs till you press ON, but you could also change it to run for only a few loops if you want.
I'm not sure if there will be speed differences between calcs, but feel free to optimize the code if you wish. You can change W if you want it to be faster or slower, but note that if you make W too small you will end up with a hyperventilating program, which I would strongly advise against.
Code:
ClrDraw
AxesOff
BackgroundOff
~132->Xmin:132->Xmax
~82->Ymin:82->Ymax
TextColor(GRAY
BLACK->C
.05->W
While 1
Wait .5
Text(70,105,"breathe
Text(82,105,"in
For(I,~40,40
Pt-On(I,40,C
Wait W
End
Wait .5
Text(70,105,"hold
Text(82,105,"
For(I,40,~40,~1
Pt-On(40,I,C
Wait W
End
Wait .5
Text(70,105,"breathe
Text(82,105,"out
For(I,40,~40,~1
Pt-On(I,~40,C
Wait W
End
Wait .5
Text(70,105,"hold
Text(82,105,"
For(I,~40,40
Pt-On(~40,I,C
Wait W
End
If C=BLACK:Then
WHITE->C
Else
BLACK->C
End
End
ClrDraw
It runs till you press ON, but you could also change it to run for only a few loops if you want.