<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi guys, I'm looking for help with the following Arduino code.<br><br>    uint32_t cm[8] = {0,0,0,0,0,0,0,0}; // Create array<br>    uint16_t maxDistance = 200; // Also used with NewPing.h library<br>    .<br>    . // Other code here<br>    .<br>    irSensorL.read(); // Read IR sensor... This is working!<br>    cm[3] = irSensorL.ranging_data.range_mm/10; // This returns 268<br>    if (cm[3] > maxDistance) {<br>      cm[3] = 999;                 /<br>    }</div><div class="gmail_default" style="font-size:small">    Serial.println(cm[3]);  / cm[3] value is always = 999<br></div><div class="gmail_default" style="font-size:small">    sendData();<br><br>The cm[3] value is always 999 when I run this.<br>If I comment out the if cm[3]... statement cm[3] value is then 268.  <br><br>...Pat C<br></div></div>