Change I2C Address SRF10
Change I2C Address of SRF10 Address Long Flash Short flashes Decimal Hex 224 E0 1 0 226 E2 1 1 228 E4 1 2 230 E6 1 3 232 E8 1 4 234 EA 1 5 236 EC 1 6 238 EE 1 7 240 F0 1 8 242 F2 1 9 244 F4 1 10 246 F6 1 11 248 F8 1 12 250 FA 1 13 252 FC 1 14 254 FE 1 15 Address Table For SRF10 can set ID for I2C up to 16 address as a table upper, So this post is about how to set ID for every SRF10. First, you need to have an only one SRF10 connect to I2C bus then use to the following code. Change Address Code: #include <Wire.h> #define ADDRESS byte(0x72) //defines address #define NEW_ADDRESS byte(0xEC) //defines address #define CMD byte(0x00) void setup() { // put your setup code here, to run once: Wire.begin(); //conects I2C Serial.begin(115200); } void loop() { // put your main code here, to run repeatedly: delay(5000); Serial.println("Begin"); Wire.beginTransmission(ADDRESS); Wire.write(CMD); Wire.write(byte(0xA0)); Wire.end