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.

GroveCircularLED Class

Module: my9221

This is a circular LED ring based on the MY9221 chip. It is often used with a rotary encoder and has 24 controllable LEDs.
grovecircularled.jpg

Item Index

Methods

GroveCircularLED

(
  • dataPin
  • clockPin
)
Number

Instantiates an GroveCircularLED object

Parameters:

  • dataPin Number

    Data pin

  • clockPin Number

    Clock pin

Returns:

Number:

setSpinner

(
  • position
)

Sets the spinner (turns off all LEDs but selected one)

Parameters:

  • position Number

    Selected position for the spinner (0-23)

setLevel

(
  • level
  • direction
)

Sets the lighting status

Parameters:

  • level Number

    Selected level for the circular LED (0-23)

  • direction Boolean

    Up or down; up is true and default