Package hw
Class IO

Public Method relaysOneShot

static void relaysOneShot(int relayNo, int mode, int time)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Parameter Range Description
relayNo 0 ... 1 number of the relay
mode 0 ... 2 mode of the relay
time 0 ... 65535 period of the state change in units of 10ms

The relaysOneShot() method switches the specified relay for the given time to the specified mode:

mode
RELAYS_SET_OFF
RELAYS_SET_ON
RELAYS_ENABLE_PWM_ON_RELAY

Note

Example

IO.relaysOneShot(1, IO.RELAYS_SET_ON, 300);

Turns relay number 1 on for 3 seconds.

See also:

IO
IO.setRelaysOnOffPWM(int, int)