upm  0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
 All Data Structures Files Functions Variables Macros Pages
Public Member Functions
MY9221 Class Reference

C++ API for MY9221 led bar module. More...

Detailed Description

This file defines the MY9221 C++ interface for libmy9221

upm::MY9221 *bar = new upm::MY9221(8, 9);
signal(SIGINT, sig_handler);
while (!running) {
for (int idx = 1; idx < 11; idx++) {
bar->setBarLevel (idx);
usleep(1000);
}
}

Public Member Functions

 MY9221 (uint8_t di, uint8_t dcki)
 
 ~MY9221 ()
 
mraa_result_t setBarLevel (uint8_t level, bool direction=true)
 
std::string name ()
 

Constructor & Destructor Documentation

MY9221 ( uint8_t  di,
uint8_t  dcki 
)

Instanciates a MY9221 object

Parameters
didata pin
dckiclock pin
~MY9221 ( )

MY9221 object destructor

Member Function Documentation

mraa_result_t setBarLevel ( uint8_t  level,
bool  direction = true 
)

Set the level bar

Parameters
levelselected level for the bar (1 - 10)
directionup or down, true is up and is the default
std::string name ( )
inline

Return name of the component


The documentation for this class was generated from the following files: