Pages: [1]   Go Down
Author Topic: ADXL345 and arduino mega 1280  (Read 520 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am using the ADXL345 accelerometer but works only with Arduino duemilanove. I never managed to run this sensor with Arduino mega1280. I am using the SPI approach (based on sparkfun online guides). Is there any difference in the pinout between duemilanove and mega1280?. Someone told me that the pins 13,12,11,10 of the duemilanove board are different on the mega 1280. I did not find any information on the internet. Please, if you have any idea... I prefer to use the mega1280 because of more pinouts (I want to connect at the same time LCD, ADXL345, Card reader, etc).

Thank you very much for your time.

P.
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5255
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The SPI is on pins 50 (MISO), 51 (MOSI) and 52 (SCK) on the Mega. SS is theoretically on 53 but often software uses pin 10 (or another) directly so you may have to look at your library or sketch to decide that. Usually it's the easiest and most portable way to get the SPI on the ICSP header (6 pin connector on the opposite side of the USB connector on the board).
Logged

Pages: [1]   Go Up
Jump to: