View Single Post
  #2   Spotlight this post!  
Unread 23-01-2012, 22:23
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: not able to read from accelerometer

A good place to start is the examples that you're given. You already have functional code for both ways to read that sensor. Go under Help->Find Examples and then go under FRC Robotics->Sensors. You'll find example code for reading the ADXL345 with both I2C and SPI interfaces.

I'd also suggest that you double check your wiring and make sure everything's connected correctly (IIRC, the front panel diagrams to the examples also have some wiring drawings to check against).
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote