Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Encoders and gyro - no idea (http://www.chiefdelphi.com/forums/showthread.php?t=102426)

joelg236 09-02-2012 22:33

Encoders and gyro - no idea
 
Programming in java, absolutely no idea whats wrong but both the gyro and the encoders attached to the motors give no output.
the encoders are attached to channels 1,2,3,4 (I didnt wire, and dont know how to) in slot 2. The gyro is in slot 1 on channel 1. We have inputed these values into our code but still no real input. Gyro gives a float point that means nothing (Still a number but not useful) and the encoders simply give us 0. Thought I'd ask you good people for some advice since we have no idea. (No experience with FRC, I'm good with Java)

Thanks in advance :)

jesusrambo 10-02-2012 00:44

Re: Encoders and gyro - no idea
 
Mind sharing your code?

cgmv123 10-02-2012 18:38

Re: Encoders and gyro - no idea
 
Make sure you didn't declare the encoders in slot 2. The first instance of every module is coded as 1, even though the first sidecar is in slot 2. Just remove the slot declaration from your code and leave the channel declaration.

java4first 12-02-2012 08:56

Re: Encoders and gyro - no idea
 
Not sure it's your problem (assuming the wiring for the two channels is correct) - but my first mistake was that the Encoders require a reset() - probably optional - and start() method invocation before you start getting data out of them.

Not sure about the gyro - that worked as advertised.


All times are GMT -5. The time now is 22:20.

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