Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Accelerometer (4 pin) with Java (http://www.chiefdelphi.com/forums/showthread.php?t=114657)

bhughes 04-03-2013 21:00

Accelerometer (4 pin) with Java
 
We've looked at this for an hour and can't figure out for the life of me how to wire and program the 2013 accelerometer. Is it digital or analog? Which pins go where? How do I instantiate it in java (and get input)?

gixxy 04-03-2013 21:40

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!


All times are GMT -5. The time now is 11:21.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi