First version with a button and added the Blinker library to the source root.
This commit is contained in:
parent
d74bcbb2b6
commit
15e33b531f
9 changed files with 246 additions and 31 deletions
28
Digispark_Passkey/Blinker/Blinker.h
Normal file
28
Digispark_Passkey/Blinker/Blinker.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef _BLINKER_H
|
||||
#define _BLINKER_H
|
||||
|
||||
#if (ARDUINO >= 100)
|
||||
# include <Arduino.h>
|
||||
#else
|
||||
# include <WProgram.h>
|
||||
#endif
|
||||
|
||||
class Blinker {
|
||||
private:
|
||||
int _blinkPin;
|
||||
uint32_t _highDelay;
|
||||
uint32_t _lowDelay;
|
||||
uint32_t _lastBlink;
|
||||
boolean _blinkState;
|
||||
boolean _running;
|
||||
|
||||
public:
|
||||
Blinker(int pin);
|
||||
void setDelay(uint32_t d);
|
||||
void setDelay(uint32_t h, uint32_t l);
|
||||
void blink();
|
||||
void start();
|
||||
void stop(bool idleState = LOW);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue