Counter

Dependencies:   EthernetInterface NTPClient SDFileSystem TextLCD WebSocketClient mbed-rtos mbed Socket lwip-eth lwip-sys lwip FATFileSystem

Committer:
Tuxitheone
Date:
Mon Feb 29 18:59:15 2016 +0000
Revision:
0:ecaf3e593122
TankCounter

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Tuxitheone 0:ecaf3e593122 1 #include "mbed.h"
Tuxitheone 0:ecaf3e593122 2
Tuxitheone 0:ecaf3e593122 3 #ifndef _Counter_H
Tuxitheone 0:ecaf3e593122 4 #define _Counter_H
Tuxitheone 0:ecaf3e593122 5 #define PulsPrLiter 450
Tuxitheone 0:ecaf3e593122 6
Tuxitheone 0:ecaf3e593122 7 class Counter {
Tuxitheone 0:ecaf3e593122 8
Tuxitheone 0:ecaf3e593122 9 private:
Tuxitheone 0:ecaf3e593122 10 InterruptIn _flowsensor;
Tuxitheone 0:ecaf3e593122 11 void click();
Tuxitheone 0:ecaf3e593122 12
Tuxitheone 0:ecaf3e593122 13
Tuxitheone 0:ecaf3e593122 14 public:
Tuxitheone 0:ecaf3e593122 15 // ********************************************************************************
Tuxitheone 0:ecaf3e593122 16 // * Constructor
Tuxitheone 0:ecaf3e593122 17 // *
Tuxitheone 0:ecaf3e593122 18 // * @param flowsignal The pin which is connected to the flowsensor.
Tuxitheone 0:ecaf3e593122 19 // ********************************************************************************
Tuxitheone 0:ecaf3e593122 20 Counter(PinName flowsignal);
Tuxitheone 0:ecaf3e593122 21
Tuxitheone 0:ecaf3e593122 22 int Count;
Tuxitheone 0:ecaf3e593122 23 float Flow();
Tuxitheone 0:ecaf3e593122 24 };
Tuxitheone 0:ecaf3e593122 25
Tuxitheone 0:ecaf3e593122 26 #endif