We are team 6431 from Istanbul Turkey and a team which is using the swerve drive for the first time(in 2024) like you which has visited this repo for help. This repo has all the issues we have faced through our Swerve rookie year and potential issue you may face as well. We are hoping that you find this repository helpful.). Special thanks to Arda Efe Özcan, Devin Karadağ, Ömer Tuna Çavdar, Melis Alsan for their support through the set up process.
Spark Max's are motor controller commonly used on a swerve drive. Spark Max's are connected in a CAN cycle in a series connection so you can't ID them via the Roborio pins. You have to use a certain software: REV HARDWARE CLIENT to do that. Firstly, you have to connect a usb-c cable to the Spark Max's usb-c port.
(usb-c port displayed here)
After the connection is esthablished a few seconds later the Spark Max will be visible on the REV Hardware client.
Here is how it appears. Altough it'll have an ID 0 because it isn't configured yet. When you click on the Spark Max you will see a screen like this:
This will appear if you have an up to date Spark Max if it needs an update an update screen will appear where you have to first do an update to acsess the main menu
In the main menu you'll have to change the CAN ID to be something other than zero and then scroll down to the bottom of the page to BURN FLASH. If you don't burn flash config wouldn't be saved.
The CANIvore is basically a device which enhances the quality of your CAN connection. Using the CANIvore quite improves you CAN connection. Firstly, you have to obviously set up you CAN bus and connect the CANIvore to your CAN bus. Next, you have to connect to your robot either through ethernet or through wifi(via the radio). Then, you have to install the phoneix tuner from: https://store.ctr-electronics.com/software/ . Once the software is install press the button on the top left and select the CANIvore tab. If all the connections are perfectly up to standarts you must see this screen:
If you are not able to see the CANIvore either your CANIvore is broken(which is quite a small possibility) or there is a fallacy in your CAN connection. Please completely check your CAN connection make sure there aren't any loose wires or missing connections. Once you have fixed these issues you'll be able to see the CANIvore
Now that you are able to see the CANIvore you must set up a couple of things. You have to set up: the firmware if not up to the latest version, also you have to setup your CANIvore name to your liking(it'll be used in the code)
CANcoder's are magnetic encoders which know the rotarary position of the swerve modules via communicating with the CAN bus. To set up your CANCoders you firstly have to connect them to the CAN bus, again you have to make sure that your CAN Bus is fully connected and on an acceptable level. Additionally, if you didn't buy the CANCoders pre soldered be sure you have perfectly soldered the CANCoders.
After you have checked the electronics and soldering connect to the robot via ethernet or wifi and open Phoneix Tuner
Altough the CANcoders have different id's here the only id your's will have will be id zero which means not configured. To configure CANcoders you have to click onto the CANcoder rectangles on your screen. Once you do that you'll see a bar like the bar below on the left hand side of the screen.
Here you firstly have to choose phoneix 6 from the dropdown menu write bove the update firmware button and then click update firmware just to be safe. After that you have to set and ID via the ID input space and then click the set button. If you want to you can give your cancoder a named as well(not required, recommended).
After these processes you are done with your Cancoder(s) and ready to go.