GY-63_MS5611/libraries/shiftInSlow/examples/shiftInSlow_demo/shiftInSlow_demo.ino
2023-02-21 13:11:46 +01:00

47 lines
760 B
C++

//
// FILE: shiftInSlow_demo.ino
// AUTHOR: Rob Tillaart
// PURPOSE: test sketch
// URL: https://github.com/RobTillaart/ShiftInSlow
#include "ShiftInSlow.h"
ShiftInSlow SIS(12, 13, LSBFIRST);
volatile int x = 0;
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.println(SHIFTINSLOW_LIB_VERSION);
for (uint16_t d = 0; d <= 1000; d += 10)
{
SIS.setDelay(d);
uint32_t start = micros();
x = SIS.read();
uint32_t stop = micros();
float duration = stop - start;
Serial.print(stop - start);
Serial.print("\t");
Serial.print(d);
Serial.print("\t");
Serial.print(duration / 8, 1);
Serial.print("\n");
}
Serial.println("done...");
}
void loop()
{
}
// -- END OF FILE --