Neumático#

Introducción#

El sistema neumático utiliza una bomba de aire y un solenoide para controlar el aire comprimido que mueve los cilindros. Permite activar o desactivar la bomba y extender o retraer los cilindros mediante código.

For the examples below, the configured Pneumatics system will be named Pneumatics1, and will be used in all subsequent examples throughout this API documentation when referring to Pneumatic class methods.

A continuación se muestra una lista de los métodos disponibles:

Acciones: Comprimir o descomprimir el aire con una bomba de aire.

  • extend – Extend a cylinder.

  • retract – Retract a cylinder.

  • pumpOn – Turn on the air pump.

  • pumpOff – Turn off the air pump.

  • pump – Set the on or off state of the air pump.

Getters – Comprueba si el solenoide está conectado.

  • installed – Returns whether or not a solenoid is connected to the Brain.

Constructores: inicializan y configuran manualmente la neumática.

Comportamiento#

extend#

extend extends a cylinder.

Usage:
Pneumatic1.extend(id);

Parámetros

Descripción

id

The cylinder to extend:

  • cylinder1
  • cylinder2
  • cylinderALL – Both cylinders
// Example coming soon

retract#

retract retracts a cylinder.

Usage:
Pneumatic1.retract(id);

Parámetros

Descripción

id

The cylinder to extend:

  • cylinder1
  • cylinder2
  • cylinderALL – Both cylinders
// Example coming soon

pumpOn#

pumpOn turns the air pump on.

Usage:
Pneumatic1.pumpOn();

Parámetros

Descripción

Este método no tiene parámetros.

// Example coming soon

pumpOff#

pumpOff turns the air pump off.

Usage:
Pneumatic1.pumpOff();

Parámetros

Descripción

Este método no tiene parámetros.

// Example coming soon

pump#

pump turns the air pump on or off.

Usage:
Pneumatic1.pump(state);

Parámetros

Descripción

state

The air pump state:

  • true – Turn the air pump on.
  • false – Turn the air pump off.
// Example coming soon

Captadores#

installed#

installed returns a Boolean indicating whether the solenoid is connected to the Brain.

  • 1 - The solenoid is connected to the Brain.

  • 0 - The solenoid is not connected to the Brain.

Usage:
Pneumatic1.installed()

Parámetros

Descripción

Este método no tiene parámetros.

// Example coming soon

Constructores#

pneumatic#

pneumatic creates an object of the pneumatic Class in the specified port.

Default Usage:
pneumatic Pneumatic1 = pneumatic(port);

Overload Usages:
pneumatic Pneumatic1 = pneumatic(port, bPumpEnable);

Parámetro

Descripción

port

Which Smart Port that the Pneumatic Solenoid is connected to as PORT followed by the port number, ranging from 1 to 12.

bPumpEnable

A Boolean representing whether to enable or disable the air pump:

  • true – The air pump is set to on at the start of a project.
  • false – The air pump is set to off at the start of the project.
    // Example coming soon