mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 03:11:15 +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
@ -65,3 +65,8 @@ int GSR::value()
|
||||
int val = mraa_aio_read(m_aio);
|
||||
return val;
|
||||
}
|
||||
|
||||
float GSR::getECValue()
|
||||
{
|
||||
return (float) GSR::value();
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <mraa/aio.h>
|
||||
#include <interfaces/iEC.hpp>
|
||||
|
||||
namespace upm {
|
||||
/**
|
||||
@ -42,7 +43,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
|
||||
@ -51,7 +52,7 @@ namespace upm {
|
||||
* @image html gsr.jpg
|
||||
* @snippet gsr.cxx Interesting
|
||||
*/
|
||||
class GSR {
|
||||
class GSR : virtual public iEC {
|
||||
public:
|
||||
/**
|
||||
* Grove GSR sensor constructor
|
||||
@ -76,9 +77,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