Functions | |
int | analog (int port) |
int | analog8 (int port) |
int | analog10 (int port) |
int | analog12 (int port) |
int | analog_et (int port) |
void | set_analog_pullup (int port, int pullup) |
int | get_analog_pullup (int port) |
For example, if there was a distance sensor in analog port 0, then you could use the following code block to move until close to an object or wall
int analog | ( | int | port | ) |
Gets the 12-bit analog value of a port.
[in] | port | A value between 0 and 5 specifying the sensor to read from. |
int analog10 | ( | int | port | ) |
Gets the 10-bit analog value of a port.
[in] | port | A value between 0 and 5 specifying the sensor to read from. |
int analog12 | ( | int | port | ) |
Gets the 12-bit analog value of a port.
[in] | port | A value between 0 and 5 specifying the sensor to read from. |
int analog8 | ( | int | port | ) |
Gets the 8-bit analog value of a port.
[in] | port | A value between 0 and 5 specifying the sensor to read from. |
int analog_et | ( | int | port | ) |
Gets the 10-bit analog value of an ET sensor on the given port.
[in] | port | A value between 0 and 7 specifying the ET sensor to read from. |
int get_analog_pullup | ( | int | port | ) |
Gets the analog pullup status for one portt.
[in] | port | A value between 0 and 7 specifying the analog sensor to read from. |
void set_analog_pullup | ( | int | port, |
int | pullup | ||
) |
Sets analog pullup status for one port.
[in] | port | A value between 0 and 5 specifying the analog sensor to read from. |
[in] | pullup | A value of 0 (inactive) or 1 (active). |