[Dprglist] Arduino Code Troubles

David P. Anderson davida at smu.edu
Fri Dec 17 12:15:55 PST 2021


Pat,

On 12/17/21 11:08 AM, markus via DPRGlist wrote:
> uint16_t maxDistance = 200; // Also used with NewPing.h libraray

What does this mean, also used with NewPing.h library.  If you replace 
that with a constant does it make any difference?

I.e.,

     if ((cm[x] == 0) or (cm[x] > maxDistance)) {
       cm[x] = 999;
     }

becomes

     if ((cm[x] == 0) or (cm[x] > 200)) {
       cm[x] = 999;
     }

???



More information about the DPRGlist mailing list