UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

SensorTemplate Class

Module: sensortemplate
  • ID: Usually the chip number used by the sensor. When this is not available or relevant, use a unique descriptor that makes sense. Must match class name.
  • Name: Short, Title-Case Description from Datasheet.
  • Other Names: Alternative names that your sensor driver might have. This may include manufacturer's name.
  • Other Chips: Alternative chip-ids that your sensor driver supports.
  • Category: One or more of: accelerometer,ainput,button,color,compass,digipot, display,electric,flexfor,gaseous,gps,led,light,liquid,medical,motor,other,pressure,relay,rfid,serial,servos,sound,temp,time,touch,video,wifi
  • Manufacturer: One or more of: Sensor manufacturer. Can be 'generic'.
  • Link: Links to vendors or data-sheets.
  • Connection: One or more of: analog,gpio,i2c,pwm,spi,uart
  • Kit: One of: gsk, hak, eak, tsk, robok

Then add a much more detailed description here. Include items such as board-specifics, testing, etc...
sensortemplate.png

Item Index

Methods

SensorTemplate

(
  • i2c_bus
)
Number

This creates an instance of SensorTemplate given an I2C bus number.

Parameters:

  • i2c_bus Number

    Target I2C bus

Returns:

Number:

sensor context pointer

helloWorld

() String

Provides an example method which returns 'Hello world'

Returns:

String: