Coding Problems

Encountering problems activating our compressor and double solenoid, would be great if someone could figure out what is going on by looking at the code.

What CAN address is the PCM?

Thank you, how do we find the address?

FYI, from the Compressor class docs:

So, if you only have one PCM in your robot all the constructors assume it’s CAN ID 0.

You can use the CTRE Phoenix Tuner to pull up the CAN devices.

We’ve only got the one, so it must be 0 then.

Yes, but you also should verify with something like the Phoenix Tuner to see that it is indeed 0, and that you don’t have any other device conflicts at that address.

https://phoenix-documentation.readthedocs.io/en/latest/ch08_BringUpCAN.html

Oir PCM is the only device wired CAN to the best of my knowledge.

Another detail, when pressing buttons two and three on the left joystick a red light on the PCM turns on and we’re hearing a small clicking noise from the bot

Just double checked cables and now compressor is turning on, though the double solenoid is not.

In your OI you have buttons 2 and 3 mapped to directly opposite actions.

One is BasketUp, and one is BasketDown. If you press them both down then what do you expect to happen?

Also, check to see if the clicking you’re hearing is one of the PDP breakers popping. We had that happen earlier this year with a student that put a compressor on a 5 amp breaker. It just repeatedly triggered with a little clicking sound.

I suppose I miscommunicated, meant to say when either button was pressed the light was turning on.

Someone just did something with the pneumatic tubing and everything is working as intended now, I’m going to go ahead and assume that the programming was not in fact the issue here for now. Thanks for the help!

For future reference:

The red light on the PCM changing at the right time is an indication that the software is doing its job.
The clicking going along with the red light is probably coming from the pneumatic solenoid actuator valve, and is an indication that the wiring is correct.

If the solenoid actuator valve is clicking but nothing is moving, that usually means that there is no pneumatic pressure.

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