Documents » Pololu AVR Library Command Reference »6. Orangutan LEDsThe OrangutanLEDs class and the C functions in this section are a very simple interface to the two user LEDs included on Orangutan boards and the 3pi robot. Note that the green/right LED is on the same pin as an LCD control pin; this LED will blink briefly whenever data is sent to the LCD, but the two functions will otherwise not interfere with each other. For a higher level overview of this library and example programs that show how this library can be used, please see Section 5.d of the guide to Programming Orangutans from the Arduino Environment or Section 6.f of the Pololu AVR C/C++ Library User’s Guide. ReferenceC++and Arduino methods are shown in red. C functions are shown in green. static void OrangutanLEDs::red(unsigned char state) void red_led(unsigned char state) This method will turn the red user LED off if state is zero, otherwise it will turn the red user LED on. You can use the Arduino keyword HIGH as an argument to turn the LED on, and you can use the Arduino keyword LOW as an argument to turn the LED off. This method will work on both the Orangutan LV-168 and the Baby Orangutan B. OrangutanLEDs::red(0); // turn the red LED on static void OrangutanLEDs::left(unsigned char state) void left_led(unsigned char state) This method is an alternate version of red(). The red LED is on the left side of the 3pi robot. static void OrangutanLEDs::green(unsigned char state) void green_led(unsigned char state) This method will turn the green user LED off if state is zero, otherwise it will turn the green user LED on. Within the Arduino environment, you can use the Arduino keyword HIGH as an argument to turn the LED on, and you can use the Arduino keyword LOW as an argument to turn the LED off. This method will only work on the Orangutan LV-168 as the Baby Orangutan B does not have a green user LED. Example:OrangutanLEDs::green(1); // turn the green LED on static void OrangutanLEDs::right(unsigned char state) void right_led(unsigned char state) This method is an alternate version of green(). The green LED is on the right side of the 3pi robot. |
|
Home
|
Contact
|
About
|
Forum
|
US toll free: 1-877-7-POLOLU |