ben winstone
/
ucam
As of Monday morning, so this is the code we showed at Uncraftivism.
Diff: Blinker.h
- Revision:
- 0:da6a22da11a2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Blinker.h Fri Dec 11 21:59:44 2009 +0000 @@ -0,0 +1,33 @@ +#pragma once + +#include "ServoMinder.h" +class Blinker +{ +public: + Blinker( ServoMinder *servoMinder ); + + void blink(); + void close(); + void open(); + void setSleepiness( float sleepiness ); + void setBoredom( float boredom ); + +private: + + + ServoMinder *m_servoMinder; + + float m_boredom; + float m_sleepiness; + float m_tickTime; + Ticker m_ticker; + float m_nextMove; + + float m_blinkTimer; + + float speedForSleepiness(); + float openPosForSleepiness(); + + void tick(); + +}; \ No newline at end of file