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:
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.
Hehe I did it for a minute or so - very cool idea.

Any ideas to add some more graphics and stuff?
tr1p1ea wrote:
Hehe I did it for a minute or so - very cool idea.

Any ideas to add some more graphics and stuff?

Yeah, I may add some other shapes and different animations, unfortunately I don’t have many ideas beyond that but I’m glad you like it!
Slight necro but I made that hyper ventilating program, just ported to the monochrome calcs.

Code:
ClrDraw
AxesOff
1->C
0->W
While 1
   Text(25,25,"breathe
   Text(34,25,"in
   For(I,~40,40
      Pt-On(I,40,C
   End
   Text(25,25,"hold             
   Text(34,25,"           
   For(I,40,~40,~1
      Pt-On(40,I,C
   End
   Text(25,25,"breathe
   Text(34,25,"out
   For(I,40,~40,~1
      Pt-On(I,~40,C
   End
   Text(25,25,"hold             
   Text(34,25,"           
   For(I,~40,40
      Pt-On(~40,I,C
   End
   If C=1:Then
      0->C
   Else
      1->C
   End
End
ClrDraw
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement