Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:remotelab:sut:generalpurpose2:b6 [2020/04/28 16:20] pczekalskien:iot-open:remotelab:sut:generalpurpose2:b6 [2020/07/20 09:00] (current) – external edit 127.0.0.1
Line 92: Line 92:
 ... ...
 </code> </code>
 +''bmp.readPressure()'' function returns air pressure in //Pa//. You must convert it //hPa//, dividing by 100.
 +
 To convert float into the string with formatting use ''sprintf'' function: To convert float into the string with formatting use ''sprintf'' function:
 <code c> <code c>
 ... ...
-  sprintf(buffer,"%4.2f hPa",pres/100);+  sprintf(buffer,"%4.2f hPa",pres);
 ... ...
   delay(5000);   delay(5000);
en/iot-open/remotelab/sut/generalpurpose2/b6.1588090833.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0