Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send y-variables / strings / programs? #16

Open
DSchndr opened this issue Mar 13, 2018 · 5 comments
Open

How to send y-variables / strings / programs? #16

DSchndr opened this issue Mar 13, 2018 · 5 comments

Comments

@DSchndr
Copy link

DSchndr commented Mar 13, 2018

My tries to send an Y-Variable / string / program (which are Y-Variables according to http://merthsoft.com/linkguide/ti83+/vars.html ) crash my calc (ti-82 stats aka. TI-83 "minus" ) everytime, which sometimes looks awesome but isn´t what i want ;)

How about an small example that sends and receives those (Y-) Variables?

Here is my code to make the header and data which gets sent to the calc (doesn´t work (un)fortunatly)

int onSendAsCBL2(uint8_t type, enum Endpoint model, int* headerlen,
                 int* datalen, data_callback* data_callback) {
[...]
  *datalen = 2 + 1; //2 length, one token
  TIVar::intToSizeWord(*datalen, &header[0]);

  //header[0] = 0x00; //length 0
  //header[1] = 0x00; //length 0
  header[2] = 0x0c; //0x04; //package id (string = 0x04) (which one should be used?) 
  header[3] = 0x9A;	//string token A
  header[4] = 0x9A; //string token A            
  header[5] = 0x8E; //string token 0
  header[6] = 0x97; //string token 9
  header[7] = 0x8E; //padding 0
  header[8] = 0x8E; //padding 0
  header[9] = 0x8E; //padding 0
  header[10] = 0x8E; //padding 0
  //header[11] = 0x00; //ver null
  //header[12] = 0x00; //checksum null
  *headerlen = 11;

  data[0] = 0x03; //length
  data[1] = 0x00; //length
  data[2] = 0xAF; //token "V"
  //*datalen = 3;
  [...] ```
@jakecrowley
Copy link

Have you figured out how to do this? I am having issues as well.

@DSchndr
Copy link
Author

DSchndr commented Jun 14, 2018

In the end I've used the fork from ajcord. Pull request #14 should also do the trick.

@KermMartian
Copy link
Owner

If you've tested and verified the code in #14, I'd be happy to merge that. Is that the case?

@DSchndr
Copy link
Author

DSchndr commented Jul 10, 2018

I've tested it with an 82Stats and remember that Calc->Arduino or Arduino->Calc worked, but i needed to hack the code a little bit up.

The code hasn't got the 82Stats model and vartype defined. (other stuff may also be required because i think the calculator wasnt recieving the right data (tokens instead of string))

#14 maybe works with an 83(+) but unfortunatly i haven't got one to test.

@KermMartian
Copy link
Owner

Sending and receiving strings is now demonstrated in the HelloWorld example that was properly merged with #14, which does indeed properly support the TI-83 Plus/TI-84 Plus family now. Sending/receiving programs and Y= variables would be a perfect next set of examples to add. Did you ever solve this yourself, @DSchndr ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants