mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Added interfaces iEC,iEmg,iClock,iHeartRate,iLineFinder
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
This commit is contained in:

committed by
Serban Waltter

parent
e7820f2831
commit
69464ae93b
@ -68,3 +68,8 @@ int GroveGSR::value()
|
||||
int val = mraa_aio_read(m_aio);
|
||||
return val;
|
||||
}
|
||||
|
||||
float GroveGSR::getECValue()
|
||||
{
|
||||
return (float) GroveGSR::value();
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user