hal/arduino/HalMultiSensor/SensorPhotocell.cpp

18 lines
259 B
C++
Raw Normal View History

#include "SensorPhotocell.h"
2016-05-02 16:39:39 +02:00
#include <Arduino.h>
void SensorPhotocell::setup()
{
2016-05-02 16:39:39 +02:00
Interrupt::setupPinInterrupt(PC2); //PC3
}
2016-05-10 16:04:39 +02:00
void SensorPhotocell::read(PowerData& data)
{
2016-05-10 16:04:39 +02:00
data.consumption = pulse;
}
void SensorPhotocell::reset()
{
pulse = 0;
}