hal/arduino/HalMultiSensor/HardwarePhotocell.cpp

24 lines
323 B
C++
Raw Normal View History

2016-02-24 21:51:16 +01:00
#include "HardwarePhotocell.h"
2016-02-24 21:51:16 +01:00
void pinInterrupt()
{
2016-02-24 21:51:16 +01:00
//++pulse;
}
2016-02-24 21:51:16 +01:00
void HardwarePhotocell::setup()
{
2016-02-24 21:51:16 +01:00
interrupt = new Interrupt(pinInterrupt);
interrupt->setupPinInterrupt(PC2); //PC3
}
2016-02-24 21:51:16 +01:00
unsigned int HardwarePhotocell::getConsumption()
{
return pulse;
}
2016-02-24 21:51:16 +01:00
void HardwarePhotocell::reset()
{
pulse = 0;
}