Functions | |
int | digital (int port) |
void | set_digital_value (int port, int value) |
int | get_digital_value (int port) |
void | set_digital_output (int port, int out) |
int | get_digital_output (int port) |
int | get_digital_pullup (int port) |
void | set_digital_pullup (int port, int pullup) |
Assuming that there is a touch sensor plugged into digital port 0, then the following code would move forward until the touch sensor was clicked.
int digital | ( | int | port | ) |
int get_digital_output | ( | int | port | ) |
int get_digital_pullup | ( | int | port | ) |
Gets the current digital pullup state
int get_digital_value | ( | int | port | ) |
Gets the current value of the digital port.
void set_digital_output | ( | int | port, |
int | out | ||
) |
Sets the digital mode.
[in] | port | The port to modify. |
[in] | out | 1 for output mode, 0 for input mode. |
void set_digital_pullup | ( | int | port, |
int | pullup | ||
) |
Sets the current digital pullup state
[in] | port | The port to modify |
[in] | pullup | The pullup state 1: active 0: inactive |
void set_digital_value | ( | int | port, |
int | value | ||
) |
Sets the value of the digital port in output mode.