Send request for Data to the kid

Started by esol, May 03, 2016, 03:18:35 PM

Previous topic - Next topic

esol

Hello,

I asked this question some time ago,

"Is there a way I can send a request for the data from the kid using the serial connection? For example, instead of waiting to receive bytes from a data stream and collecting 4 bytes of data at a time in a while loop, is it possible for me to send a set request and receive a response for a specific variable such as comm_battery_temp?"

I did some research and found that I am able to send a request and recieve something back from the kid.

I wrote this program in Java.  It starts with making a serial connection to the kid using a Serial Library called NRSerialPort.  I open a connection through the port "/dev/ttyUSB0" (since I am working on a linux box) and once connected I send an array of byte arrays in Hex format that correspond to 14 of the enum variables available to us and I get back the hex value of what the data for those variables should be.  I will post the code shortly.