Relative Content

Tag Archive for caccelerometerspiatmegaatmega32

Driver for a ADXL345, using an ATmega328p-pu and SPI communication, running it all bare metal

So as the title suggest im trying to make a driver for the ADXL345, for this project im using a ATMega328p-pu and the SPI communication protocol. Im running this all bare metal, so when i run my main.cpp it should blink an LED 6 times and then setup the ADXL for communication after the setup it should read the DEVID form the ADXL and if it is returned it should turn on another LED, the problem is that is does make the first LED blink 3 times, but then nothing happens after. Im not sure if the problem is in the code or the physical setup, but i hope someone can point me in the right direction.