analogs module

analogs.analog(port)

Gets the 12-bit analog value of a port.

Parameters:

port (int) – A value between 0 and 5 specifying the sensor to read from.

Returns:

The latest 12-bit value of the port (a value in the range 0 to 4095).

Return type:

int

analogs.analog10(port)

Gets the 10-bit analog value of a port.

Parameters:

port (int) – A value between 0 and 5 specifying the sensor to read from.

Returns:

The latest 10-bit value of the port (a value in the range 0 to 1023).

Return type:

int

analogs.analog12(port)

Gets the 12-bit analog value of a port.

Parameters:

port (int) – A value between 0 and 5 specifying the sensor to read from.

Returns:

The latest 12-bit value of the port (a value in the range 0 to 4095).

Return type:

int

analogs.analog8(port)

Gets the 8-bit analog value of a port.

Parameters:

port (int) – A value between 0 and 5 specifying the sensor to read from.

Returns:

The latest 8-bit value of the port (a value in the range 0 to 255).

Return type:

int

analogs.analog_et(port)

Gets the 10-bit analog value of an ET sensor on the given port.

Parameters:

port (int) – A value between 0 and 7 specifying the ET sensor to read from.

Returns:

The latest 10-bit value of the port (a value in the range 0 to 1023).

Return type:

int

Deprecated:

defaulting to analog() on the Wallaby

analogs.get_analog_pullup(port)

Gets the analog pullup status for one port.

Parameters:

port (int) – A value between 0 and 7 specifying the analog sensor to read from.

Returns:

The status of the analog pullup on the specified port.

Return type:

int

Deprecated:

no effect on the Wallaby

analogs.set_analog_pullup(port, pullup)

Sets analog pullup status for one port.

Parameters:
  • port (int) – A value between 0 and 5 specifying the analog sensor to read from.

  • pullup (int) – A value of 0 (inactive) or 1 (active).

Deprecated:

no effect on the Wallaby