Hi arnob, the SRF08 should work with RP6 Base.
If not, check:
* hardware connection (SCL, SDA, 5V, GND) ok?
* using the correct I2C adress?
If no success after checking the above points:
- post a photo showing the hardware connection
- post your program
Gruß
Dirk
Hello and welcome,
the expansion connectors XBUS1 and XBUS2 contains, both a I2C bus (SDA, SCL).
I2C Tutorials and Specs: http://www.robot-electronics.co.uk/i2c-tutorial
http://www.ti.com/lit/an/slva704/slva704.pdf
http://www.i2c-bus.org/fileadmin/ftp...ation_1995.pdf
#
Geändert von i_make_it (24.02.2018 um 08:59 Uhr)
Hi arnob,
the hardware connection seems to be ok.
The original example "RP6Base_Move_05" doesn't contain any code for the SRF08.
Try the original example "RP6Base_I2CMaster_03" first.
In this example change the line:
#define SRF_ADR 0xE6
...to...
#define SRF_ADR 0xE0
Then compile the example again and test it with the SRF08.
Post your result here.
Good luck!
Gruß
Dirk
Hi Dirk,
It was mistake, it should be: RP6Examples_20120725f \ RP6BASE_EXAMPLES \ RP 6Base_I2CMaster_03 \ RP6Base_I2CMaster_03.hex
Actually, I have tried this....Sorry...
I am trying this now-
#define SRF_ADR 0xE6
... to ...
#define SRF_ADR 0xE0
Thanks
- - - Aktualisiert - - -
Terminal shows the same thing. so, problem remains.
Morning, I will try to use pull up resistors.
Hope, it will work.
Address information for the SRF08 you can find in the document:
http://coecsl.ece.illinois.edu/ge423...onicRanger.pdf
On Page 3 you will find:
The default shipped address of the SRF08 is 0xE0. It can be changed by the user to any of 16 addresses E0, E2, E4, E6, E8, EA, EC, EE, F0, F2, F4, F6, F8, FA, FC or FE, therefore up to 16 sonar's can be used. In addition to the above addresses, all sonar's on the I2C bus will respond to address 0 - the General Broadcast address. This means that writing a ranging command to I2C address 0 (0x00) will start all sonar's ranging at the same time.
If your SRF08 is brand new it will respond on address 0xE0.
If it is a used one, you don't know, if the former owner has changed the address.
Then you can start Ranging with Address 0x00 and poll all 16 posible addresses for a value.
So you can find out the address.
Geändert von i_make_it (28.02.2018 um 07:50 Uhr)
Lesezeichen