Skip to main content
Version: 3.1.0

Piston

Constructors

Piston()

Creates a new Piston object.

input_port ADI port the solenoid is plugged into.
default_state sets the default state of the piston.

Piston(int input_port, bool default_state = false);

Piston()

Creates a new Piston object where the solenoid is plugged into a 3 wire expander.

input_port ADI port the solenoid is plugged into.
default_state sets the default state of the piston.

Piston(int input_port, int expander_smart_port, bool default_state = false);

Setters

set()

Sets the piston to fire.

input boolean to fire the piston.

void set(bool input);

button_toggle()

Toggles the piston back and forward with a single button during opcontrol.

toggle an input button.

void button_toggle(int toggle);

buttons()

Sets the piston to go in and out with 2 buttons during opcontrol.

active the button to activate the piston.
deactive the button to retract the piston.

void buttons(int active, int deactive);

Getter

get()

Gets the state of the piston.

bool get();