ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Anyone using SRF08 ranger on address other then 0xF8?

asked 2013-03-29 15:18:01 -0500

KM6VV gravatar image

updated 2014-01-28 17:15:58 -0500

ngrennan gravatar image

I've got a single SRF08 ranger running on the supplied 0xF8 address, but I can't get it to work on the other addresses (I need several sensors). I have verified the ranger to be addressed to 0xE8, but the ranger does not reply to either the programmed address 0xE8, or the +4 address the author uses for subsequent calls.

The author suggests:

New_Address += 4; // offset address not sure why this is but it works for this address

I have implemented a multi-ranger program in the past (on a 2620 PIC), and I didn't need to do any "+4" trick to get it working. It also worked on all six addresses. I have not yet "ported" my my code to the Atmel (I wanted to use the Sonar_srf08 library).

There is a newer version of the library, but it's essentially the same, just added gain and range parameters to several wire.writes.

Any ideas or fixes?

Thanks, Alan

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-30 08:05:39 -0500

KM6VV gravatar image

updated 2013-03-30 08:06:46 -0500

I fixed the problem. The SonarSRF08 library did not shift the I2C address right by one, so the addresses sent to Wire were wrong.

Wire.beginTransmission(address/2); Wire.requestFrom(address/2, numBytes);

Now the +4 added to the address in the example (calling program) is not needed. I have now added code to cycle through my three SRF08 Sonar modules.


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-03-29 15:18:01 -0500

Seen: 241 times

Last updated: Mar 30 '13