SR504
Forums:
Hi,
Would someone be able to help as to how to connect the SR504 (https://www.piborg.org/accessories/sr04) to the PiBorg? Also, some sample codes to get it working would be most appreciated.
Thank you.
Best,
Prem
Hi,
Would someone be able to help as to how to connect the SR504 (https://www.piborg.org/accessories/sr04) to the PiBorg? Also, some sample codes to get it working would be most appreciated.
Thank you.
Best,
Prem
piborg
Mon, 09/14/2015 - 11:17
Permalink
Connecting SR04s to a Raspberry Pi robot
There are a few ways you can connect the SR04 to a Raspberry Pi to choose from.
We would recommend using one of our UltraBorgs to read the SR04.
This is probably the easiest method as the board does most of the work for you, simply returning actual distance values straight from the library.
The connection and setup for an UltraBorg is all explained here.
The software installation provides a few examples, one of which reads the SR04s to get distances:
Alternatively you can connect the SR04 to the Raspberry Pi itself.
This does not involve any additional boards, but the software is a little more tricky.
There is a good guide here which explains how to do this.
The value you get will be a bit noisy however, the values from UltraBorg are pre-filtered to make them more stable.
premraj07
Tue, 09/22/2015 - 18:20
Permalink
Thank you very much! This is
Thank you very much! This is very helpful!