Relay Error

Hello, I’m having some issues with Relays and I’m not entirely sure why. If anyone has any insight it would be much appreciated.

How I’m calling the pneumatics class:

Pneumatics pneu = new Pneumatics();

How I’m creating the relays:

Relay oneR = new Relay(2);
	   Relay twoR = new Relay(0);

https://gm1.ggpht.com/2ViFOP6FMHPz2c4tTzfu9jUEVvWnD_qSF6iuYk1VMAdHApXGSh-8fqlFfgqDxpchRflhVFWmjlLpL-0_omA00MLIliCn0HazB7wVLmdTIy-yCQ8ONAvrgrgHyRaprFiWWw3ZqBRPPSDUXCNDdXvSTRDcow23visTQ6HYs903MubmJR5CjdArmFoa21J5wQRxikjFLg9bBJfS53TH4lyr-lK6faoX-b0gR8qhfRpCkeMsRlGdPkq1Y5eYo8RccxzIKvrhZ4k40XL7MIs1IICDAqBhMzeX90icZvXH77XYFiHioHGKmCBwOgIGy1uYt0LIuoCGGDBs4bJzGhZUe7QOaUdEhcKIwKdbwCkqMIpcd-iCXeWQPkFGh-PVYk7VHF1tyVC5AZB1brc43db4LsgBkpvC06KloF6X0HhqVUHUOesxoFSmSiCwAtTCJj1yqqNf_UcWWg0f9HTbLhYpNKWzuqcDbelbR4vpqgcH4dLPXywm4lF5sewrIv1Fz1giBsV5lLk1ygNtfY5Eg3-dyJIx3T8tI1leetA-ZXWk10GdOQ_ptnJZkmBv28QcaTDA_R45UXkgoYTxv0yPySP7s-JvU03uAqKXO28Mjenj1DHOptxdJrJxMCvn4IseHjDLSN1ZjchKKrUpsuPAonfHgnNP1_VmlOfsgauH7L2jKp6639Nu=w1345-h544-l75-ft

There’s not nearly enough detail here to figure out your problem; bits of source code and wiring diagrams would be nice. The one thing that strikes me from what little is here is that you are linking the Relay and Pneumatics classes. Doing so was common up through 2014, when (spike) Relays were used to turn the compressor on/off, and could also (iirc) be used to control pneumatic solenoids. 3946 did not use pneumatics in 2015 (we have this as a fall project), so I’m not familiar with the details, but I believe that the normative pneumatics system in 2015 used the PCM (Pneumatics Control Module) to control the compressor through an entirely automated system that improved compressor startup efficency over a spike, and also used the PCM to control the solenoid valves. The bottom line is that a Relay and a Pneumatic system, while they could coexist on the same robot, were usually parts of different subsystems.

To go into more detail, we’re using three double solenoids to fill three air tanks with nitrogen gas. The two relays are used to fire the air in the tanks (3 barreled t-shirt cannon).

The strange things is if I put the relays into the robot.java class and use them from there I do not get an error. I’m not entirely sure why putting them into another class is causing issues.