Hi, Sorry to take so long getting back to this - a few days away... So - in the end I just wired a standard resistor (47K) across R19 (for mode 4). Less than elegant. I then wired to a UART (I used a software port on an Arduino for testing) - and fired off the trigger (1) at 20ms intervals. I connec...
I'm just waiting on some resistors to have a play.... In the UART modes it outputs the length as two bytes - in a 4 byte block (header, datahi, datalo, checksum) - the length is datahi * 256 + datalo So if we catch the data to an array d[4] it would be d[1] x 256 + d[2] The result is in mm The excep...
The component only seems to work with the compatibility mode.
The other modes are interesting too though - I'll try and add something to the board so I can easily switch the connection at r19 and play some more....
I wrote a very simple program - that sends a trigger and then waits for a return pulse. It measures this using a loop with a 58us delay - and the results look reasonable. Note that the sensor has a minimum range of ~20cm and results go awry below this. The code here also has no time out - so if a re...
The component 'attempts' to add an extra delay - delay 'type' but this is just 20us - the delay before the output pulse (on the board I have anyway) is 12.4ms
Wired up the sensor to an Arduino - and got 9999 (error). R19 open (mode 1 HCSR04 compatible) I added a connection to a logic analyser - and the output from the sensor looks good - there is a 'trigger' pulse - followed by an output pulse of variable length (depending on distance) However - the outpu...