mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
39 lines
806 B
Arduino
39 lines
806 B
Arduino
|
// FILE: led13.ino
|
||
|
// AUTHOR: Rob dot Tillaart at gmail dot com
|
||
|
// VERSION: 0.1.0
|
||
|
// PURPOSE: demo pinGroup library for Arduino
|
||
|
// blink the build in led by means of a PinOutGroup
|
||
|
|
||
|
#include "PinOutGroup.h"
|
||
|
|
||
|
PinOutGroup led13;
|
||
|
|
||
|
uint8_t ar[1] = { 13 } ;
|
||
|
|
||
|
uint32_t start , stop;
|
||
|
|
||
|
void setup()
|
||
|
{
|
||
|
Serial.begin(115200);
|
||
|
Serial.println(__FILE__);
|
||
|
Serial.print(F("PINOUTGROUP_LIB_VERSION: "));
|
||
|
Serial.println(PINOUTGROUP_LIB_VERSION);
|
||
|
|
||
|
led13.add(1, ar );
|
||
|
}
|
||
|
|
||
|
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);
|
||
|
}
|
||
|
|
||
|
// -- END OF FILE --
|