#2 ultrasonic polling

open
nobody
None
5
2006-04-17
2006-04-17
MadMan2k
No

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.

Discussion

  • MadMan2k
    MadMan2k
    2006-04-17

     
    Attachments
  • dopez
    dopez
    2006-04-17

    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.