View Single Post
  #2   Spotlight this post!  
Unread 04-03-2013, 21:40
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Accelerometer (4 pin) with Java

As for wiring it. It uses I2C (I squared C). The I2C port on the Digital Sidecar is located behind the Phone-like jack (Which is also an I2C jack for use with Certain sensors), as seen in the image below. (Note: ONLY the one closest to the phone-like port is I2C, the other 4 pins next to that are not).



For programming I will refer you to the code we used this year. We use it in a PID loop for use in Leveling our robot during climbing.

Subsystem:
ClimbingMotor

Command:
LevelDuringClimb

Forgive any roughness in this code, it was done by our newer programmers. Any other questions, please ask away!
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker

Last edited by gixxy : 04-03-2013 at 21:47.