Apps     Components     Interfaces     All Files     Source Tree     source: apps.Sense.SenseM.nc

Component: SenseM

Implementation for Sense application. (Lesson 2 in the tutorial) When clock fires, this application reads the sensor and displays the higher 3 bits of the ADC readings to LEDs.
Author: David Culler
  Su Ping
  Intel Research Berkeley Lab

Required Interfaces

Provided Interfaces

Function Index

Function Descriptions

display

result_t display(uint16_t value)

Module scoped method. Displays the lowest 3 bits to the LEDs, with RED being the most signficant and YELLOW being the least significant.
Returns: returns SUCCESS

StdControl.init

command result_t StdControl.init (void)

Initialize the component. Initialize ADCControl, Leds
Returns: returns SUCCESS or FAILED

StdControl.start

command result_t StdControl.start (void)

Start the component. Start the clock.
Returns: returns SUCCESS or FAILED

StdControl.stop

command result_t StdControl.stop (void)

Stop the component. Stop the clock.
Returns: returns SUCCESS or FAILED

Timer.fired

event result_t Timer.fired (void)

Read sensor data in response to the Timer.fired event.
Returns: The result of calling ADC.getData().

ADC.dataReady

async event result_t ADC.dataReady (uint16_t data)

Display the upper 3 bits of sensor reading to LEDs in response to the ADC.dataReady event.
Returns: Always returns SUCCESS