TucsonDon
Member
Thank you for your input and I can appreciate that some don't care for MCC but you and the people that wrote it know more about this then I do (self taught hobbyist), having said that it produces code that has been a teaching tool for me. With the code from MCC this is what I have
I get the following error:
temp.c:46: error: (182) illegal conversion between types
void -> pointer to void
for: i2c_readDataBlock(address,reg,*data,len)
C:
void GetTemp(void)
{
uint8_t chan = 3;
uint8_t ii = 0;
uint8_t i;
float TempRead;
for (i = 0; i<chan; i++)
{
data = &TempRead;
TempRead = *((float*)data);
i2c_readDataBlock(address, reg, *data, len);
if (ii == 0) SysTemp.ArrayTemp = TempRead;
else if (ii = 1) SysTemp.WaterTemp = TempRead;
else SysTemp.PoolTemp = TempRead;
ii++;
}
}
temp.c:46: error: (182) illegal conversion between types
void -> pointer to void
for: i2c_readDataBlock(address,reg,*data,len)