The other way to wire the accelerometer might be easier if you just have the three wire pwm cables.
Quote:
|
The SPI port is found on J4 and was setup to be easily wired to the Digital I/O on the Digital Sidecar. Although the pins can be connected to any GPIOs in any order, it is easiest to use Digital I/O 1-4. Connect 0V and 5V to the (-) and PWR pins that are just beyond Digital I/O 1, and [CK, DI, DO, CS] in order.
|
Looking at the 8 J4 connections, wire two pwm cables to the bottom 6. Plug the first one into the digital IO port 1 like a normal connection. Plug the second one across the signal pins of ports 2 , 3, and 4. This is slightly different from the doc quoted above which says to use the power pins located just below the port 1 pins. Not sure why it would matter.
Then go run the ADXL345 SPI Accelerometer example program and verify that you have everything wired correctly. It seemed to work for us today.