Interface: moteiv.tos.sensorboards.invent.Potentiometer

interface Potentiometer

Interface for setting the value of a variable resistor (potentiometer).

Author:
Joe Polastre, Moteiv Corporation <info@moteiv.com>

Commands
command uint8_t get() Get the current value of the potentiometer.
command result_t set(uint8_t value) Set the potentiometer to an 8-bit value.

Events
event void setDone(uint8_t value, result_t result) Notification that the value of the potentiometer may have changed.

Commands - Details

get

command uint8_t get()

Get the current value of the potentiometer.

Returns:
8-bit raw potentiometer value.

set

command result_t set(uint8_t value)

Set the potentiometer to an 8-bit value.

Parameters:
value - New value for the potentiometer.
Returns:
SUCCESS if the request was accepted, FAIL if the system is busy.

Events - Details

setDone

event void setDone(uint8_t value, result_t result)

Notification that the value of the potentiometer may have changed.

Parameters:
value - New value for the potentiometer.
result - SUCCESS if the new value is now in place, FAIL if an error prevented the new value from being set.