GY-63_MS5611/libraries/float16/examples/float16_test1/float16_test1.ino
2021-12-02 20:27:32 +01:00

47 lines
640 B
C++

//
// FILE: float16_test1.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.0
// PURPOSE: test float16
// DATE: 2015-03-11
// URL: https://github.com/RobTillaart/float16
//
#include "float16.h"
float16 X;
void setup()
{
while(!Serial);
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("FLOAT16_LIB_VERSION: ");
Serial.println(FLOAT16_LIB_VERSION);
float f;
// dump all possible values
for (uint16_t n = 0; n < 65535; n++)
{
f = X.f16tof32(n);
Serial.print(n);
Serial.print('\t');
Serial.println(f, 6);
}
Serial.println("\ndone");
}
void loop()
{
}
// -- END OF FILE --