I am trying to make a program in TI-Basic on the TI-84 Plus CE in which two USB-linked calculators communicate with each other via retrieving variable values using the GetCalc()
command, and I am trying to detect if there is a link between two calculators to avoid an error. Both calculators would have the same program beforehand. How can I do this?
I have tried making a variable with a very specific and unique value and seeing if the other calculator has this value using GetCalc()
, but this results in an error.
The code I tried is here:
"Insert random unique string here"->T
while not(getCalc(T,0)="Insert random unique string here"
Output(1,1,"Connecting to calculator..."
End
What I hoped this script would do here is that if the variable fetched(T) from the other calculator exists and equals what I set the local calculator's variable(T) to, that would mean that both calculators have the program and are running it, and otherwise, it would continue attempting, and say "Connecting to calculator...". However, it stops and gives an error message, and when I use Goto, it says the error is at the T variable in the getCalc function.