GY-63_MS5611/libraries/shiftOutSlow/examples/shiftOutSlow_demo/shiftOutSlow_demo.ino
2021-12-28 11:53:42 +01:00

45 lines
703 B
C++

//
// FILE: shiftOutSlow_demo.ino
// AUTHOR: Rob Tillaart
// PURPOSE: test sketch
// URL: https://github.com/RobTillaart/ShiftOutSlow
#include "ShiftOutSlow.h"
ShiftOutSlow SOS(12, 13, LSBFIRST);
volatile int x = 0;
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.println(SHIFTOUTSLOW_LIB_VERSION);
for (uint16_t d = 0; d < 1000; d += 10)
{
SOS.setDelay(d);
uint32_t start = micros();
x = SOS.write(0x55);
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 --