Using the Photon with IMU shield to drive motors

Hi,

I am planning on picking up a photon with the IMU Shield on a small RC car. The plan is to use the wifi capabilities to control the car externally using a camera detection system.
My issue is, I would like to keep recieving data from the gyroscope and accelerometer which is why I am using the IMU shield. However, it seems that the shield takes up all the pins, is there any chance in which I can still have 2 PWM pins to drive the motors while using the IMU shield?

Sorry if the question seems trivial, but I am new to all of this.
Thanks in advance!

Can you share the link for the IMU shield?

I believe not all pins are used. You just need to solder to the unused ones with PWM capability.


here is a link to the IMU.

Thanks for the prompt reply!

If you look at the schematics, you’ll see which pins are actually used and which are still available

And depending on your choice of interface I2C vs. SPI not even all the used pins are occupied but can be used by your project.

If you need higher data rate, SPI is the way to go.

This will use pins A2 to A5, leaving D2, D3, WKP, RX and TX available for PWM.

Using I2C,

D0 and D1 will be used, leaving A5/D2, A4/D3, WKP, RX and TX

Take note that A5/D2 and A4/D3 will have the same PWM output and cannot be controlled independently.

Reference: https://docs.particle.io/reference/firmware/photon/#analogwrite-pwm-

If I use SPI will D0 and D1 be free? The data rate shouldn’t be too much of an issue but I need to ensure that I have 2 independant PWM pins.

Just take note that using SPI will require cutting traces on the shield.

D0 and D1 are available in SPI mode but I left it out due to the pull-up resistors on the line.
No harm using it though.

AFAIK the pull-ups can be detached via cut-jumpers - and should be in SPI mode