Some more work on Hal Arduino sensor. issue 18
This commit is contained in:
parent
050addfa31
commit
c9a030774b
8 changed files with 128 additions and 33 deletions
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue