48 lines
785 B
Arduino
Raw Normal View History

2021-05-30 14:25:53 +02:00
//
// 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;
2021-12-28 11:53:42 +01:00
2021-05-30 14:25:53 +02:00
void setup()
{
Serial.begin(115200);
2023-02-21 14:13:13 +01:00
Serial.println(__FILE__);
2021-05-30 14:25:53 +02:00
Serial.println(SHIFTOUTSLOW_LIB_VERSION);
2023-02-21 14:13:13 +01:00
for (uint16_t d = 0; d <= 1000; d += 100)
2021-05-30 14:25:53 +02:00
{
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");
2023-02-21 14:13:13 +01:00
Serial.print(d);
Serial.print("\t");
Serial.print(duration / 8, 1);
Serial.print("\n");
delay(20);
2021-05-30 14:25:53 +02:00
}
Serial.println("done...");
}
2021-12-28 11:53:42 +01:00
2021-05-30 14:25:53 +02:00
void loop()
{
}
2021-12-28 11:53:42 +01:00
2021-05-30 14:25:53 +02:00
// -- END OF FILE --