set_led_value: Set the value of a led instance.

Description Usage Arguments Value Methods (by class) Examples

Description

Sets the value of a given led instance.

Usage

1
2
3
4
set_led_value(x, value)

## S4 method for signature 'LED'
set_led_value(x, value)

Arguments

x

A LED instance.

value

A numeric of length one. If 0, the LED will be off. Other values between 0 and 1 can be specified as brightness for the LED.

Value

The same LED instance provided as input.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Get a led instance.
led <- get_led(14)
# Turn the led to its maximum intensity.
set_led_value(led, 1)
# Turn the led off.
set_led_value(led, 0)

## End(Not run)

jcrodriguez1989/r2led documentation built on Sept. 6, 2020, 12:07 a.m.