Hi Everyone
Let me give you some background. I'm building a wireless weather station using a variety of sensors, an adruino mini and an nRF24L01+ radio. All this works properly and fine. I've been prototyping with the receiver also running an arduino just for simplicity however the end goal was always to have my Netduino 2 Plus acting as the receiver due to the easy network integration.
Last night I spent a lot of time getting the radios talking and that is now working however I'm getting a byte packed array from the arduino (it uses the RF24 library) that contains floating point numbers. Endian issues aside I can't now get that byte packed array back to the floating point numbers I sent using any safe code as far as I can tell.
There are some posts scattered around using unsafe code to do this with varying levels of success but I need this to a) not eat my netduino, and be rock solid.
Without a bitconverter class available there is no "easy" way to do this, but I'd settle for hard at this point as long as the code was safe. I'm struggling to believe something seemingly as simple as this hasn't been solved in a more complete way but if I can't do this then it's back to my arduino receiver and buying an ethernet shield to get the job done.
This isn't the first time I've run into difficulties converting data types and it's probably the primary reason I have been spending less time with my netduino hardware, but that there seems to be no way to go from a byte array to a float just beggars belief.
Am I missing something somewhere?
Thanks