Robotpy Falcon 500 code help

So my team is struggling to code the Falcon 500 in python. We managed to piece the SRX but can’t get the falcons to spin.

Here is a link to our code so far. 2021-Code/ at main · sykoyoyo/2021-Code · GitHub

And we have tried variations of the TalonFXControlMode etc. but we’re not landing success. Of someone would be kind to post an example we would greatly appreciate it!

Thank you!

Just because people do this way too often, you’re not plugging the falcons into the SRX right?

Correct. They are on their own

To be clear piecing the srx meant coding those to work for the chassis. We are using the falcons for our shooters.

So we are struggling to get them coded properly to perform.

We have them setup and firmware updated to 21. Each has its own CAN ID as well.

Probably electrical then. Do you have a wiring diagram you’re using or a clear pic of your test Ed?

When we run our teleop this is what happens in the console.

Oh try switching to WPI_TalonFX. Just like with the SRX.


The magic answer right there! Now next question is how to set brake mode on them :slight_smile:

Are the docs not useful here?

1 Like

Out of honesty we had been using the docs. But I have not seen that page specifically.

We will be bookmarking that and reading it through!

Thank you!

Also coming from a non-programmer… the second one kind of makes sense. However the first one was a bit confusing as it didn’t give us much to go off of when we are all relearning how to use it and have very little coding background (mostly block based background).

We spent a lot of time looking through the GitHub code examples too and that is where we found the WPI_TalonSRX. But didn’t consider that for the TalonFX either.

The first link is the API documentation, which you would also get from your IDE’s autocomplete. All the prose is directly copy-pasted from CTRE’s docs.

If you have suggestions on how we can improve navigating our docs, I’d love to hear them. Any improvements to the text itself should go to CTRE though.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.