Salida digital#

Introducción#

El dispositivo Salida digital de 3 cables permite que el V5 Brain envíe una señal digital (alta o baja) a un componente externo, como un LED, un relé u otro dispositivo electrónico.

This page uses dig_out as the example Digital Out device name. Replace it with your own configured name as needed.

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

  • set – Sets the signal level of a 3-Wire Digital Out port to high or low.

Constructor: inicializa y configura manualmente un dispositivo de salida digital.

colocar#

set outputs a high or low signal to the connected Digital Out device.

Usage:
dig_out.set(boolean)

Parámetro

Descripción

boolean

Whether to send a high or low signal:

  • True – Send a high signal (5V)
  • False – Send a low signal (0V)

# Send out a low signal from dig_out
dig_out.set(False)

Constructor#

Constructors are used to manually create DigitalOut objects, which are necessary for configuring a Digital Out device outside of VEXcode.

DigitalOut#

DigitalOut creates a Digital Out device.

Usage:
DigitalOut(port)

Parámetro

Descripción

port

The 3-Wire Port that the Digital Out device is connected to:

  • On the V5 Brainbrain.three_wire_port.x where x is the number of the port.
  • On a 3-Wire Expanderexpander.a where expander is the name of the expander instance.

# Create a Digital Out device in Port A
dig_out = DigitalOut(brain.three_wire_port.a)