Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
It's a line following robot, it's for a second year project. I want to take a slightly different approach than using the old photodiode or LDR method. I wanted to see how much light was being reflected off the surface and actually create PID controller using a PIC 16F or 18F
I assume this is a standard 400kbps I2C. Typically any given I.C. allows only a few address selection.
You can use some of the GPIO's to create chip selects to further select devices that become active on the I2C bus. Many I2C device have an additional chip select pin to facilitate this. If not you can add a AND gate to the data lines to mute the reception to a given chip.
Another approach to getting a value that represents the line position is to use multiple LEDs and photo detectors in a line. By illuminating each LED in turn and reading the 3 sensors near it you can calculate the line position. This will also be faster than using I²C.
See how they are arranged on this one. This arrangement should give you a value of ±5.