NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages

This is an example of how to use the ReadSensorHTBarometric function.

task main()
int temp;
unsigned int press;
while (true)
ReadSensorHTBarometric(S3, temp, press);
NumOut(0, LCD_LINE1, temp);
TextOut(40, LCD_LINE1, " 1/10ths C");
NumOut(0, LCD_LINE2, press);
float tc = temp / 10.0;
TextOut(0, LCD_LINE3, FormatNum("%5.2f C", tc));
TextOut(0, LCD_LINE4, FormatNum("%5.2f F", tc*9/5+32));
TextOut(0, LCD_LINE5, FormatNum("%3.3f inHg", press/1000.0));