Some more work on Hal Arduino sensor. issue 18

This commit is contained in:
Ziver Koc 2016-02-24 14:37:48 +01:00
parent 050addfa31
commit c9a030774b
8 changed files with 128 additions and 33 deletions

View file

@ -0,0 +1,23 @@
public void pinInterrupt()
{
++pulse;
}
public HardwarePhotocell::setup()
{
pinInterrupt = InterruptUtil(pinInterrupt);
pinInterrupt.setupPinInterrupt(PC2); //PC3
}
public unsigned int HardwarePhotocell::getConsumption()
{
return pulse;
}
public unsigned int HardwarePhotocell::reset()
{
pulse = 0;
}