Added interfaces iEC,iEmg,iClock,iHeartRate,iLineFinder

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
This commit is contained in:
Stefan Andritoiu
2018-06-20 18:24:26 +03:00
committed by Serban Waltter
parent e7820f2831
commit 69464ae93b
22 changed files with 368 additions and 59 deletions

View File

@ -68,3 +68,8 @@ int GroveGSR::value()
int val = mraa_aio_read(m_aio);
return val;
}
float GroveGSR::getECValue()
{
return (float) GroveGSR::value();
}

View File

@ -25,6 +25,7 @@
#include <string>
#include <mraa/aio.h>
#include <interfaces/iEC.hpp>
namespace upm {
/**
@ -44,7 +45,7 @@ namespace upm {
* @con analog
*
* @brief API for the Grove GSR Galvanic Skin Response Sensor
*
*
* Measures the electrical conductance of skin
* to measure strong emotional reactions.
* In other words, it measures sweat on your fingers
@ -53,7 +54,7 @@ namespace upm {
* @image html gsr.jpg
* @snippet grovegsr.cxx Interesting
*/
class GroveGSR {
class GroveGSR : virtual public iEC {
public:
/**
* Grove GSR sensor constructor
@ -78,9 +79,14 @@ namespace upm {
*/
int value();
/**
* Gets the electrical conductance of the skin from the sensor
*
* @return Electrical conductance of the skin
*/
virtual float getECValue();
private:
mraa_aio_context m_aio;
};
}