Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Sample code for ADXL345 and SPI?


  • Please log in to reply
5 replies to this topic

#1 orange

orange

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 17 November 2011 - 02:47 PM

Does anybody have a good implementation for ADXL345 and SPI for netduino?

#2 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 17 November 2011 - 03:04 PM

Hi Orange and welcome to the Netduino forums!

A quick search on Google dragged me to here: Accelerometers: ADXL345 Library and Netduino Tutorial
Does that help?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#3 orange

orange

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 19 November 2011 - 04:36 AM

Hi,

Thanks for the reply however it's not SPI hence does not answer the question.

Hi Orange and welcome to the Netduino forums!

A quick search on Google dragged me to here: Accelerometers: ADXL345 Library and Netduino Tutorial
Does that help?



#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 19 November 2011 - 05:13 AM

Orange, could you explain better your problem?
Biggest fault of Netduino? It runs by electricity.

#5 CharlesTucker

CharlesTucker

    Member

  • Members
  • PipPip
  • 19 posts

Posted 19 November 2011 - 06:23 AM

The link Stefan provided uses I2C (and works very well, I have implemented it), I understand Orange wants to use SPI instead for communication with the accelerometers. I searched a bit further, and found some references, but they are generally questions from people struggling with it. I did find libraries for the mbed, both an I2C and SPI version at http://mbed.org/cook...5-Accelerometer, maybe that helps.

#6 orange

orange

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 26 November 2011 - 02:59 AM

Thanks Charles, I ended up writing the code (with a lot of trial and error) from scratch. This page was quite helpful on explaining undocumented (and strange) behavior of API: http://wiki.netduino...-WriteRead.ashx

The link Stefan provided uses I2C (and works very well, I have implemented it), I understand Orange wants to use SPI instead for communication with the accelerometers. I searched a bit further, and found some references, but they are generally questions from people struggling with it. I did find libraries for the mbed, both an I2C and SPI version at http://mbed.org/cook...5-Accelerometer, maybe that helps.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.