example code using statis library for temperature measurement with LM35 and LM335

Dependencies:   mbed statis

Committer:
greletj
Date:
Thu Nov 22 14:47:20 2012 +0000
Revision:
3:0e06300940cd
Parent:
tickerEvent.h@1:5821fa15d6ca
Child:
5:0b3569945178
last version added and compile with outils but works with filter

Who changed what in which revision?

UserRevisionLine numberNew contents of line
greletj 1:5821fa15d6ca 1 /*-------------------------------------------------------------------------*/
greletj 1:5821fa15d6ca 2 /* tickerEvent header class declaration */
greletj 1:5821fa15d6ca 3 /*-------------------------------------------------------------------------*/
greletj 1:5821fa15d6ca 4 /* Ni-MH charger project US191 IRD */
greletj 1:5821fa15d6ca 5 /*-------------------------------------------------------------------------*/
greletj 1:5821fa15d6ca 6 /* Nov 2012 | J Grelet */
greletj 1:5821fa15d6ca 7 /*-------------------------------------------------------------------------*/
greletj 1:5821fa15d6ca 8
greletj 1:5821fa15d6ca 9 #ifndef tickerEvent_H
greletj 1:5821fa15d6ca 10 #define tickerEvent_H
greletj 1:5821fa15d6ca 11
greletj 1:5821fa15d6ca 12 #include "mbed.h"
greletj 1:5821fa15d6ca 13
greletj 1:5821fa15d6ca 14 class tickerEvent {
greletj 1:5821fa15d6ca 15 private:
greletj 1:5821fa15d6ca 16 Ticker _ticker;
greletj 1:5821fa15d6ca 17 DigitalOut _pin;
greletj 1:5821fa15d6ca 18
greletj 1:5821fa15d6ca 19 public:
greletj 1:5821fa15d6ca 20 // Constructor
greletj 1:5821fa15d6ca 21 tickerEvent(PinName pin, float delay);
greletj 1:5821fa15d6ca 22
greletj 1:5821fa15d6ca 23 // Destructor
greletj 1:5821fa15d6ca 24 ~tickerEvent(void);
greletj 1:5821fa15d6ca 25
greletj 1:5821fa15d6ca 26 // return pin status
greletj 1:5821fa15d6ca 27 int read(void);
greletj 1:5821fa15d6ca 28
greletj 1:5821fa15d6ca 29 // A shorthand for read()
greletj 1:5821fa15d6ca 30 operator int() {
greletj 1:5821fa15d6ca 31 return read();
greletj 1:5821fa15d6ca 32 }
greletj 1:5821fa15d6ca 33
greletj 1:5821fa15d6ca 34 private:
greletj 1:5821fa15d6ca 35 // method that change pin status
greletj 1:5821fa15d6ca 36 void toDo(void);
greletj 1:5821fa15d6ca 37
greletj 1:5821fa15d6ca 38 };
greletj 1:5821fa15d6ca 39
greletj 1:5821fa15d6ca 40 #endif // tickerEvent_H