User Manual
Reference
C++ and Arduino methods are shown in red.
C functions are shown in green.
static void OrangutanDigital::setOutput(unsigned char pin, unsigned char outputState);
void set_digital_output(unsigned char pin, unsigned char output_state);
Sets the specified pin as an output. The pin argument should be one of the IO_* keywords (e.g. IO_D1 for pin
PD1). The output_state argument should either be LOW (to drive the line low), HIGH (to drive the line high),
or TOGGLE (to toggle between high and low).
static void OrangutanDigital::setInput(unsigned char pin, unsigned char inputState);
void set_digital_input(unsigned char pin, unsigned char input_state);
Sets the specified pin as an input. The pin argument should be one of the IO_* keywords (e.g. IO_D1 for
pin PD1). The input_state argument should either be HIGH_IMPEDANCE (to disable the pull-up resistor) or
PULL_UP_ENABLED (to enable the pull-up resistor).
static unsigned char OrangutanDigital::isInputHigh(unsigned char pin);
unsigned char is_digital_input_high(unsigned char pin);
Reads the input value of the specified pin. The pin argument should be one of the IO_* keywords (e.g. IO_D1
for pin PD1). If the reading is low (0 V), this method will return 0. If the reading is high (5 V), it will return
a non-zero number that depends on the pin number. This function returns the value of the pin regardless
of whether it is configured as an input or an output. If you want the pin to be an input, you must first call
set_digital_input() to make the pin an input.
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation
4. Orangutan Digital I/O Page 19 of 65