David Knight / Mbed 2 deprecated lichtspiel

Dependencies:   PololuLedStrip mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Pulser.h Source File

Pulser.h

00001 #ifndef PULSER_H
00002 #define PULSER_H
00003 
00004 #include "mbed.h"
00005 
00006 class Pulser {
00007   public:
00008     Pulser(PinName _pin);
00009     void pulse();
00010     void steady();
00011     void off();
00012   private:
00013     static const uint8_t delay = 30;
00014     uint32_t value;
00015     int16_t direction;
00016     uint32_t lastUpdate;
00017     AnalogOut out;
00018     Timer timer;
00019 };
00020 
00021 #endif