this patch was initially created by dopez and adds
ultrasonic polling to the library.
I have not applied it yet, since the US module is not
part of the default hardware, and the code should be
perhaps moved into an extra file in order not to bloat
the size.
the TCNT2 line makes the US module not work (and to be
honest i have no idea why yet, i probably should dig into
the datasheets again) just removing it makes the module work
again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1495850
it is probably best to move functions for alternative
hardware (or extentions) into different files.
oh, there is one small bug in the patch, in :
ISR(TIMER2_COMP_vect)
{
TCNT2 += 0x25;
count36kHz++;
if(!count36kHz) timebase++;
}
the TCNT2 line makes the US module not work (and to be
honest i have no idea why yet, i probably should dig into
the datasheets again) just removing it makes the module work
again.