Ok, so I am able to run the serialTest code located on your website sir Gordon (
http://unicorn.drogon.net/serialTest.c) and confirm a working serial communication.
Next is the code for the actual project. This is how i understood it to go:
//---------------------------------------------------------------------------------------------//
Open serial communication.
Send the hex value "0xAA21" from the Rpi to the VR module to start the recognition process.
Wait for the reply of the VR module (0xCC) confirming and starting recognition.
//continuous loop
Start receiving hex commands from the VR module to the RPi. (I will be using 5 commands which have equivalent values of 0x11, 0x12, 0x13, 0x14, and 0x15)
Using Switch/case statement (or is there something better?) to compare the received values and determine what to do.
//continuous loop
close serial communications
exit application
//-------------------------------------------------------------------------------------------//
Any suggestions, advice, or comment, or anything that needs to be done that i forgot to include?
Thanks in advance!