Segway Video and TI Pong
Yes, its been over a month, but I have made quite a it of progress on my Segway, and, without further adieu:
Initial Segway Test from Kerry Snyder on Vimeo.
It balances itself! Now all I need to do is adjust the PID constants. And put in a big red E-Stop switch.
Item #2: TI calculator Pong
I made this while I was bored in math class last year, all by myself, programmed in a BASIC-like language on our school's graphing calculators, which I believe are TI-83+'s.
Here is the calculator manual, with programming information: Chapter 16
And here is the code:
Lbl F ClrHome Menu("PLAY PONG","PLAY",Z,"HIGH SCORE",K,"QUIT",S) Pause Lbl Z 1→B 0→G 1→O 1→P 0→J Lbl U getKey→A If A=34 Then B+1→B Then 8→B End ClrHome Output(B,1,"[") End If A=25 Then B-1→B If B<1 Then 1→B End ClrHome Output(B,1,"[") End If G=0 Then randInt(3,6)→X randInt(6,10)→Y Output(X,Y,"+") G+1→G Else Output(X,Y,"+") If P=1 Then X+1→X Else X-1→X End If O=1 Then Y+1→Y Else Y-1→Y End If X>8 Then 8→X 0→P End If X<1 Then 1→X 1→P End If Y>16 Then 16→Y 0→O End If Y<2 Then If X=B or B-1=X or B+1=X Then 2→Y 1→O J+1=J Else ClrHome Disp "GAME OVER" Pause Output(5,4,"SCORE:") Output(5,11,J) Pause If J>E Then J→E ClrHome Output(5,2,"NEW HIGH SCORE") Pause End Pause Menu("GAME OVER","PLAY AGAIN",H,"QUIT",S) End End ClrHome Output(B,1,"[") Output(X,Y,"+") End Goto U Lbl H 1→B 0→G 1→O 1→P 0→J Goto F Lbl S 0→J ClrHome Stop Lbl K Output(5,2,"HIGH SCORE:") Output(5,14,E) Pause Goto F
blog comments powered by Disqus