43 lines
775 B
Arduino
Raw Normal View History

2020-05-20 09:53:04 +02:00
// FILE: led13.ino
2021-11-13 15:19:09 +01:00
// AUTHOR: Rob Tillaart
// PURPOSE: demo pinOutGroup library for Arduino
2020-05-20 09:53:04 +02:00
// blink the build in led by means of a PinOutGroup
2021-11-13 15:19:09 +01:00
2020-05-20 09:53:04 +02:00
#include "PinOutGroup.h"
PinOutGroup led13;
uint8_t ar[1] = { 13 } ;
uint32_t start , stop;
2021-11-13 15:19:09 +01:00
2020-05-20 09:53:04 +02:00
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print(F("PINOUTGROUP_LIB_VERSION: "));
Serial.println(PINOUTGROUP_LIB_VERSION);
led13.add(1, ar );
}
2021-11-13 15:19:09 +01:00
2020-05-20 09:53:04 +02:00
void loop()
{
Serial.println();
start = micros();
led13.write(0, HIGH); // could be led13.write(1); as there is just one in the group.
stop = micros();
Serial.println(stop - start);
delay(250);
led13.write(0, LOW); // could be led13.write(0); as there is just one in the group.
delay(250);
}
2021-11-13 15:19:09 +01:00
2020-05-20 09:53:04 +02:00
// -- END OF FILE --
2021-12-23 18:59:45 +01:00