Hi,
Below is the program section taken from the WifiAppDemo. ( I will post the full source code later in the wiki page)
tmpH is the MSB and tmpL is the LSB of the temperature or humidity reading from the device, if current pClientProp->i2ccmdstep is under step3, the tmpvalue is humidity reading, or else is the temperature reading. The calculation is in the if-else loop.
tmpvalue=(double)(256*tmpH)+tmpL;
if (pClientProp->i2ccmdstep==step3)
{
//Humidity reading
pDrvHumidity->humidity=(float)(125*tmpvalue/65536)-6;
DMgr_RecNextStep(pClientProp,&DrvHumidity_refresh);
}
else {
//temperature reading
pDrvHumidity->temperature=(float)(175.72*tmpvalue/65536)-46.8;
pDrvHumidity->dataready=1;
DMgr_SendDone(pClientProp);
}
Just uploaded the full source code for the Wifi Remote I2c Server and the Demo App. The link in the wiki are,
http://wiki.pine64.org/index.php/Wifi_Re...c#Download