I’m coding the driver for my 9DoF IMU, and the actual drier should be easy, but I am having a hard time getting NETMF to read complete sentences from the serial port.
So, first question is: What’s the best way to read sentances?
Method A is to simply subscribe to the data present event and proces that data that way.
Method B is to only try to read the serial port when a property’s getter is triggered (IE, at razor.Yaw).
Method A is bad because it will always be using processor time, regardless of whether or not I am actually using the readings it is working so hard to process.
Method B is bad because I’m having a very difficult time getting it to read the sentence.
I uploaded custom code to the IMU, so the data format is…
(each comma separated token is sent individually, so it’s not as easy as coming down in one chunk)
My idea was to listen to serial until I found the \n, then try to parse it, but this is getting to be a real hassle.
sorry if this is hard to read. It’s late, I’m tired :