I have a device that I would like to operate from a computer. The device is connected to the computer through a COM port. What I need to do is send to the device instructions to make a measurement and then receive the results. The device accepts HEX commands, the following is the HEX command to ask the device to wake up, take a measurement, and return a value 0xC1 0xD2 0x21. The device documentation states the response will be “Response (HEX): 0x02, 0x00 (Data Lowbyte), 0x00 (Data Highbyte)”
I have been doing a lot of internet searching to try and piece together the code to make this happen but I’m stuck on how to send and receive the HEX information. Also I’m not even sure what I have is correct. Any help would be appreciated!!
While you are correct in finding that error, that however, is not the overall problem I'm having. I need to communicate with a device connected through the com port.