Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

measurement/Potentiometer.h

Committer:
xinlei
Date:
2016-08-08
Revision:
139:f8ab852e83e7
Parent:
137:a52821cdb108

File content as of revision 139:f8ab852e83e7:

#ifndef POTENTIOMETER_H
#define POTENTIOMETER_H
#include "mbed.h"
#include "AbstractReporter.h"


class Potentiometer: public AbstractReporter
{
public:
        Potentiometer(): timer() {
                oldValues[0] = 0;
                oldValues[1] = 0;
                timer.start();
        }
        virtual ~Potentiometer() {}
        virtual bool init() { return true; }
        virtual const char* name() const { return "Poti"; }
        virtual int read(char*, size_t, char*, size_t);
private:
        float oldValues[2];
        Timer timer;
};

#endif /* POTENTIOMETER_H */