uqtpy.sensors.apds

Module Contents

class uqtpy.sensors.apds.APDS(port=1, ob=True)
apds = None
port
name = 'apds'
type = 'sensor'
ob
scl = 22
sda = 21
frequency = 800000
ports_enabled
directions
initialize()
Returns:

No return value

enable(port=None)

Enabling sensor

disable(port=None)
get_type()

get the type

Returns:

str: type of component

get_name()

get the name

Returns:

str: name of component

enable_gesture()

Enable Gesture Sensor

Args:

port (int, optional): port number. Defaults to None.

disable_gesture()

Disable Gyro Sensor

Args:

port (int, optional): port number. Defaults to None.

read_gesture()

read the gesture when ever there is a movement

Returns:

str: Last gesture reported to sensor

enable_proximity()

Enable Proximity Sensor

Args:

port (int, optional): port number. Defaults to None.

disable_proximity()

Disable Proximity Sensor

Args:

port (int, optional): port number. Defaults to None.

read_proximity()

read the proximity value

Returns:

int: return proximity value

read_ambient_light()

read the light ambience value

Returns:

int: return light ambience value

enable_light()

Enable the light sensor

disable_light()

Disable the light sensor

read_red()

read the light red value

Returns:

int: return light red value

read_green()

read the light green value

Returns:

int: return light green value

read_blue()

read the light blue value

Returns:

int: return light blue value

read_color()

read the light rgb value

Returns:

int: return light rgb value

process_message(message=None)

[summary]

Args:

message (str, optional): Message in JSON format for processing. Defaults to None.

Example:

{ {“g” : [“g” ,”p”, “c”, “a”]} {“e”:[“g”,”p”,”l”]} {“d” : [“g” ,”p”, “l”]} }

Returns:

str: returns JSON response

get_value()

get the value in json format

Args:

port (int, optional): port number. Defaults to None.

Returns:

str: returns JSON response