Pages: [1]   Go Down
Author Topic: conntecting 4 srf08 sensors  (Read 1813 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi !

How can I connect four srf08 sensors to and arduino mega,
the following link only shows how to connect 1 ,
http://www.robot-electronics.co.uk/files/srf08.pde  (example)
http://www.robot-electronics.co.uk/htm/srf08tech.html (technical data)
and i don't know how to change the addresses of the ultrasonics.
If possible please post code, to help me solve my problem.

Thanks
Regards

Jak24
Logged

The Netherlands
Offline Offline
Newbie
*
Karma: 1
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First of all, you must connect the srf's one by one and chance the adress(at least for 3 of them , so that they all have different adresses).
Connecting shouldn't be to difficult, just connect the 5V and GND to arduino power pins. And the SDA and SCL go to pin 20 and 21. Pull up resistors are included in the board.
Then just send these commands to the old adress: 0xA0, 0xAA, 0xA5, <new adress> . So if we want to chance the adress to E2:
Code:
Wire.beginTransmission(0x70);
Wire.send(0xA0);                         
Wire.send(0xAA);   
Wire.send(0xA5);
Wire.send(0xE2);
Wire.endTransmission();
Logged

Pages: [1]   Go Up
Jump to: