Arduino {code}racer API
... better know the details.

Functions

void CodeRacer::set_leds_left_stop_frwd_right (ledstate leftled, ledstate stopled, ledstate frwdled, ledstate rightled)
 Sets all of the 4 LEDs to a ledstate (LEDON, LEDOFF) More...
 
void CodeRacer::set_leds_all (ledstate alleds)
 Sets all of the 4 LEDs to the same ledstate (LEDON, LEDOFF) More...
 
void CodeRacer::set_leds_all_off ()
 Sets all of the 4 LEDs to the ledstate LEDOFF. More...
 
void CodeRacer::set_leds_all_on ()
 Sets all of the 4 LEDs to the ledstate LEDON. More...
 

Detailed Description

Function Documentation

◆ set_leds_left_stop_frwd_right()

void CodeRacer::set_leds_left_stop_frwd_right ( ledstate  leftled,
ledstate  stopled,
ledstate  frwdled,
ledstate  rightled 
)

Sets all of the 4 LEDs to a ledstate (LEDON, LEDOFF)

Parameters
leftledset state of status left LED (most left yellow led)
stopledset state of status stop LED (red led)
frwdledset state of status forward LED (green or blue led)
rightledset state of status right LED (most right yellow led)
Returns
nothing

Definition at line 1037 of file CodeRacer.cpp.

1037  {
1038  digitalWrite(_led_left_pin, leftled);
1039  digitalWrite(_led_frwd_pin, frwdled);
1040  digitalWrite(_led_right_pin, rightled);
1041  digitalWrite(_led_stop_pin, stopled);
1042 }

◆ set_leds_all()

void CodeRacer::set_leds_all ( ledstate  alleds)

Sets all of the 4 LEDs to the same ledstate (LEDON, LEDOFF)

Parameters
alledsset state to all status LEDs
Returns
nothing

Definition at line 1048 of file CodeRacer.cpp.

1048  {
1049  digitalWrite(_led_left_pin, alleds);
1050  digitalWrite(_led_frwd_pin, alleds);
1051  digitalWrite(_led_right_pin, alleds);
1052  digitalWrite(_led_stop_pin, alleds);
1053 }

◆ set_leds_all_off()

void CodeRacer::set_leds_all_off ( )

Sets all of the 4 LEDs to the ledstate LEDOFF.

Returns
nothing

Definition at line 1058 of file CodeRacer.cpp.

1058  {
1059  set_leds_all(LEDOFF);
1060 }

◆ set_leds_all_on()

void CodeRacer::set_leds_all_on ( )

Sets all of the 4 LEDs to the ledstate LEDON.

Returns
nothing

Definition at line 1065 of file CodeRacer.cpp.

1065  {
1066  set_leds_all(LEDON);
1067 }