I'm using a MPL3115A2 sensor from sparkfun.
-product page :https://www.sparkfun.com/products/11084?
-Data Sheet http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Pressure/MPL3115A2.pdf
Unfortunately i'm new to programming and am having a bit of trouble
I have the sensor set in altimeter mode and seems to be working properly so far. I'm having trouble with the pressure offset feature. From the data sheet I understand that sending the current ground level in Pa (divided by 2) to the 0x14 and 0x15 addresses would set the ground level for a relative altitude measurement. My project also incorporates multiple bmp085 sensor, so no problem. When on the ground I read the bmp085 sensor and get ground level pressure in Pa, then send that value to the MPL3115A2. Unfortunately I'm unsure how to send my Pa 'int' value in hex to the sensor.
groundPressure = value_from_bmp085
groundPressure *= .5;
value_to_send_x14 = Magic_pixie_dust(groundPressure);
value_to_Send_x15 = More_magic_pixie_dust(groundPressure);
// BAR_IN_MSB (0x14):
IIC_Write(0x14, ???? );
// BAR_IN_LSB (0x15):
IIC_Write(0x15, ???? );
Any help would be greatly appreciated.