ArTICL icon indicating copy to clipboard operation
ArTICL copied to clipboard

HelloWorld not sending string

Open M47H3W opened this issue 5 years ago • 4 comments

Although sending a string from the calculator to the arduino works, I cannot get the arduino to send the "Hello World" message to the calculator. I am using the example HelloWorld project.

Am I doing something wrong or is it the program? I don't see any reference to send() in the HelloWorld.ino file

M47H3W avatar Oct 16 '19 01:10 M47H3W

Are you following the instructions at the top of the HelloWorld.ino to call Get(Str1) on the calculator? The Arduino can't send a string to the calculator without the calculator actively requesting it. Please see also the HIWORLD.8xp test program that contains Get() and Send() commands to interact with the Arduino.

I don't see any reference to send() in the HelloWorld.ino file

Because the Arduino only sends a string on the calculator's request, the "sending" is callback-driven. Take a look at the onRequest() function: https://github.com/KermMartian/ArTICL/blob/81346efbfda32f356191439ef0f81ba8120f2546/examples/HelloWorld/HelloWorld.ino#L52-L77

KermMartian avatar Oct 16 '19 15:10 KermMartian

Thank you for the reply! I was utilizing the HelloWorld.8xp file which that comes in the same directory. The get(Str1 command is included but never works unfortunately.

After some more testing if I clear out the Str1 variable then it will always fail and say "Err: Unknown" on the calculator, but sending from the calculator to the arduino seems to work okay.

I recorded this YouTube video showing the program

The Str1 variable is only updated when it is set by the user for sending from the calculator to the arduino. When I opened the program on the calculator a 2nd time in the video, it failed with Get(Str1 and just ended up showing the old value which was set for sending from calc -> arduino

M47H3W avatar Oct 16 '19 15:10 M47H3W

Small update: It appears that using the exact same configuration, the TI-84 Plus C Silver Edition works while the standard TI-84 Plus does not.

Additionally, setting a delay() inside onRequest() will delay the message being sent to the C Silver Edition while the standard TI 84 plus still takes the same amount of time to throw an error or return the wrong thing, so I guess this is a start.

I will attempt to see why this differs between the two but I'm not too experienced with this kind of thing.

M47H3W avatar Oct 20 '19 22:10 M47H3W

I have figured out the issue and posted my findings on the forum. https://cemetech.net/forum/viewtopic.php?p=282700#282700

M47H3W avatar Oct 21 '19 21:10 M47H3W