Continue to Site

Reply to thread


>>I am then getting about 3.3v out of the yellow and white sensor wire.
yellow line
RXUART receiving data line
white line  (photo shows disconnected)TXUART transmitting data line


  • Verify Tx, Rx disconnected at each end, run program ensure Tx voltage changes. 10 Hz rate.
  • Ensure all grounds are same (0V)
  • Try lower values of "0x55"


ALSO, Potential Issues

  • No Timeout Mechanism: If the sensor doesn’t respond, the code will repeatedly print "Waiting for response..." every 100 ms, potentially flooding the serial monitor. A timeout mechanism would make the code more robust.
  • Buffer Overflow Risk: If the sensor sends data faster than the Arduino processes it (e.g., multiple packets before the loop reads them), the Serial1 buffer (typically 64 bytes on Arduino) could overflow, causing data loss.
  • The code doesn’t clear the buffer if the header is invalid, which could lead to misalignment in subsequent reads.

Consult : https://www.dfrobot.com/forum/


Part and Inventory Search

Back
Top