I am trying to figure out how to drive a servo with a Particle Photon via a PCM9685 board.
When I look in the Library of Particle Build, there is an existing library that looks like already does what I need!
I have been using the following diagram to figure out where the I2C wires should go.
Based on the library’s github page, I think I have the wiring correct
I have (Particle) wired to -> (PCM):
GND -> GND
D0 -> SCA
D1 -> SCL
The motor controller is getting its own 5v power supply via a wall wart, and the photon is powered via USB connected to my laptop. I am not sure if the USB is necessary… it boots up when I have the 5v connected but I have read the external power is necessary due to fluctuations from servo power usage.
When I flash any of the examples (servo.ino from the PCM9685 library) the LED on the board eventually starts breathing green… indicating it’s not connected to the cloud anymore. I figured out how to USB flash the tinker app with particle-cli, which I have to do every time the servo sketches “crash” the board and make it go green.
I’m not sure how to debug this… it’s my first project with the Photon. Any suggestions on how to wire this or even better what I can do to debug what’s going on would be appreciated!