GY-63_MS5611/libraries/Temperature/examples/heatindexC_test/heatindexC_test.ino

48 lines
696 B
Arduino
Raw Normal View History

2020-11-27 05:33:55 -05:00
//
// FILE: heatindexC_test.ino
// AUTHOR: Rob Tillaart
2022-01-09 14:35:35 -05:00
// PURPOSE: demo - test average performance per call in micros.
2020-11-27 05:33:55 -05:00
// DATE: 2020-04-04
2021-01-29 06:31:58 -05:00
2020-11-27 05:33:55 -05:00
#include "temperature.h"
2021-01-29 06:31:58 -05:00
2020-11-27 05:33:55 -05:00
uint32_t start;
uint32_t duration1;
volatile float hi;
2021-12-28 13:11:26 -05:00
2020-11-27 05:33:55 -05:00
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.println(heatIndexC(25, 50), 2);
2022-01-09 14:35:35 -05:00
start = micros();
int cnt = 0;
2020-11-27 05:33:55 -05:00
for (int cel = 10; cel < 80; cel++)
{
for (int hum = 1; hum < 100; hum++)
{
hi = heatIndexC(cel, hum);
2022-01-09 14:35:35 -05:00
cnt++;
2020-11-27 05:33:55 -05:00
}
}
2022-01-09 14:35:35 -05:00
duration1 = micros() - start;
2020-11-27 05:33:55 -05:00
Serial.println(duration1);
2022-01-09 14:35:35 -05:00
Serial.println(1.0 * duration1 / cnt);
2020-11-27 05:33:55 -05:00
Serial.print("Done...");
}
2021-12-28 13:11:26 -05:00
2020-11-27 05:33:55 -05:00
void loop()
{
}
2021-12-28 13:11:26 -05:00
2020-11-27 05:33:55 -05:00
// -- END OF FILE --