GY-63_MS5611/libraries/shiftInSlow/examples/shiftInSlow_demo/shiftInSlow_demo.ino
2021-12-28 11:35:20 +01:00

45 lines
693 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.println(duration / 8, 1);
}
Serial.println("done...");
}
void loop()
{
}
// -- END OF FILE --