Grelet Jacques
/
Ni-MH_V3
example code using statis library for temperature measurement with LM35 and LM335
tickerEvent.cpp
- Committer:
- greletj
- Date:
- 2012-11-19
- Revision:
- 0:5ce1bc75ff24
- Child:
- 1:5821fa15d6ca
File content as of revision 0:5ce1bc75ff24:
// tickerEvent.cpp #include "tickerEvent.h" tickerEvent::tickerEvent(PinName pin, float delay) : _pin(pin) { // _pin(pin) means pass pin to the DigitalOut constructor _pin = 0; // default the output to 0 // Attach a function to be called by the Ticker, specifiying the interval delay in seconds. ticker.attach(this, &tickerEvent::toDo, delay); } tickerEvent::~tickerEvent() { } void tickerEvent::toDo(void) { _pin = !_pin; }