First and foremost, sorry if my questions and explanations are pretty basic, this is all new for me.
I built my Phobot Rover Kit and it works perfectly well.
I would like to continue building onto it but I’m not 100% sure of what’s left as input / output from the Photon board now that it’s mounted on the Phobot shield.
I would like to add a micro servo (ES08A). I know there are M1 and M2 free but I would need an analog input to drive the micro servo. I’m not sure to read it properly but from the Phobot scematic here (https://github.com/simonmonk/PhoBot/blob/master/hardware/Scematic.pdf) all the Photon analog inputs are already used.
I’m not familiar with the PhoBot other than looking at the schematic above, but it looks like it exposes the I2C interface on J2.
If you want to drive a lot of additional servos you could use something like a PCA9685. That can drive 16 servos off a single I2C interface on the Photon. Adafruit has a breakout board for it (Part 1411).
If you want to drive a lot of additional servos you could use something like a PCA9685. That can drive 16 servos off a single I2C interface on the Photon. Adafruit has a breakout board for it (Part 1411).
@rickkas7, do you know a I2C component that does inputs, outputs and PWMs?
I would like to use the I2C to extends the number the of inputs / outputs. As far as I understand the PCA9685 does not support inputs. I found the MCP23017 but it does not support PWM and also it seems there are users having issues using it with the Photon…
I suspect there isn’t actually such a component, but it doesn’t really matter. The way I2C is designed, you can connect multiple devices to a single I2C bus. They can be different types of devices (PWM output, GPIO, analog DAC/ADC, etc.) even from different manufacturers and usually they will coexist on the same I2C interface.
Each I2C device has its own factory-defined address. Because the address space is very small (7 to 10 bits) there are some conflicts, but most well-known parts from reputable vendors like NXP don’t conflict because NXP allocates them. These addresses are baked into the libraries that you use to access the devices so you don’t need to worry about it; it is should just work.
Also, some devices allow for multiple instances of the device on a single I2C bus. A common example is the DS-75 temperature sensor. There are 3 pins on the chip that allow you to select which of 8 possible instances of this device this is on a single I2C bus.
Incidentally, a common alternative to I2C is SPI. The Particle products support SPI as well as I2C, and even both at the same time on different pins.
I think the pins required for the SPI are not available anymore once you connected it with the PhoBot. I only have the I2C left. I will look into 2 I2C devices that can live together.