![]() |
Java Pneumatics
I was told this year I have to program our compressor and Solenoid for our robotic arm. I only programmed ROBOTC for FTC before. We have nobody experienced in Java and while we have a drive program I can't for the life of me find out how to program pneumatics. Can anybody help me out even if its a little?
(This is my first post, sorry if its done wrong) |
Re: Java Pneumatics
For the Solenoids, the first thing to do is to create the Solenoid object. The constructor follows the general WPI format, with options to create it based on slot (of the Solenoid module) and channel, or just by channel.
Code:
Solenoid armSol = new Solenoid(7,4); //creates a Solenoid object in slot 7, channel 4.Code:
armSol.set(true); //turns the Solenoid onCode:
Compressor aCompressor = new Compressor(1,1); //create a compressor with the default slots and relay and pressure switch channels 1 and 1. |
Re: Java Pneumatics
My double and single solenoid class
Code:
package com.shadowh511.mayor.outputs; |
Re: Java Pneumatics
Thank you! Those both were very helpful!!!!
|
| All times are GMT -5. The time now is 08:12 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi