Quote:
Originally Posted by Aslihanokur
Hi teams,
This year we want to use swerve drive thus we tried it but there is a problem: We used the codes from team 1640. On the 1640's programme, cables are wired from encoder to analog. We cannot wire the cables to analog because cables have 8 outputs but the roborio has 4 inputs in the analog part. Therefore we searched it on the internet and found that we should wire the cables which come from encoder to roborio's dio part. We did it in this way but the code didn't work. In the programme that we used, the wheels don't move synchronously.
We cannot determine the source of the issue. Is it because of electronics or programme? What should we done? Can you help us please? Thank you 
|
It sounds like your encoders are Quadrature encoders - given that they have 2 outputs per. Quadrature encoders do wire to 2 DIO's each, however You want to have Analog or Absolute encoders for most swerve codes, I am pretty sure including Sabotage's code - this is also what we have
used in past. If not familiar - search on the many threads on CD on this.
Typically also with absolute encoders on a swerve the encoder is reading 1:1 the steering output - depending on your set up you may need an auxiliary gear, agin there are several CD posts that cover this that you can search on.
It is possible to use quadrature, (relative) encoders that you have - but I do not recommend. It involves different code of course to read and use the quadrature readings, and other considerations (initialization) and is not favored by most teams (at least by my informal observation) that run swerve. Though I believe 973's old off-season swerve may have used relative encoder.
Good Luck!