Can someone explain what’s happening. If I run this code, I see a pixel being turned on and off in the center of the screen when I press the Enter key at each Pause in the code. If I remove the “ from the Text line, it no longer works. It’s as if the pxl-Test command doesn’t work with Text. This is on my TI-84 Plus CE. This is code that I simplified from another program that I’m working on that isn’t working because of this. It’s version 5.4.0.0034


Code:

ClrDraw
Lbl W
pxl-Test(82,132)→F
If F=0:Pxl-On(82,132)
If F=1:Pxl-Off(82,132)
Pause
“Text(150,125,F)
Goto W
dave1707 wrote:
Can someone explain what’s happening. If I run this code, I see a pixel being turned on and off in the center of the screen when I press the Enter key at each Pause in the code. If I remove the “ from the Text line, it no longer works. It’s as if the pxl-Test command doesn’t work with Text. This is on my TI-84 Plus CE. This is code that I simplified from another program that I’m working on that isn’t working because of this. It’s version 5.4.0.0034


Code:
ClrDraw
Lbl W
pxl-Test(82,132)→F
If F=0:Pxl-On(82,132)
If F=1:Pxl-Off(82,132)
Pause
“Text(150,125,F)
Goto W

That's some very weird behavior, I see nothing wrong with the code and I can replicate your issue, seems like an actual bug in the OS. For the purposes of your program though, you can just do this

Code:
ClrDraw
Lbl W
pxl-Test(82,132)→F
If F=0:Pxl-On(82,132)
If F=1:Pxl-Off(82,132)
Pause
Text(150,125,F)
DispGraph
Goto W


EDIT: I discussed this with someone from the dev team at TI, he didn't make any promises but told me to keep my eyes peeled for the next OS release Wink
mr womp womp

Thanks for the response, that works. I’m not sure how much the DispGraph will slow down the code in my other program.
I thought I’d try the Langton Ant on my Ti84+CE. I have a Red line below where the ant starts so the ant has something to interact with sooner. Because of the Line command, set the window values Xmin Xmax Ymin Ymax to -10,10,-10,10 so when the code runs, the line is about 1/4 of the way from the bottom. I show the iteration count in the upper left. The ant breaks away from the group at around 10,000 iterations and hits the red line at about 12,000. I let this run for over 1/2 hour and it was kind of interesting. The red line totally gets changed along the way and the ant breaks away several times. This is kind of slow on the calculator, but that’s OK. It runs at about 30 iterations per second. On my iPad, I have the slow speed at 1200 iterations per second with the max setting at around 1.6 million per second.


Code:

“LANGTON ANT
ClrDraw
132→A:82→B:1→P:0→H
Line(-6,-7,6,-7,1,RED
Lbl W
H+1→H
pxl-Test(B,A)→F
If F=1:Then:P+1→P
Else:P-1→P:End
Pxl-Change(B,A)
If P=5:Then:1→P:Else
If P=0:Then:4→P:End:End
If P=1:Then:B-1→B:Else
If P=2:Then:A-1→A:Else
If P=3:Then:B+1→B:Else
If P=4:Then:A+1→A:End
End:End:End
If A<0:264→A
If A>264:0→A
If B<0:164→B
If B>164:0→B
Text(0,0,H)
DispGraph
Goto W
I was having some weird bugs with pixel test on the CSE as well a whole ago

Like 3 years ago...
  
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 2 of 2
» 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