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

C++ API for Seven segments screen. More...

Detailed Description

This file defines the TM1637 C++ interface for lib4digitdisplay

upm::TM1637 *display = new upm::TM1637(8, 9); // di - 8, dcki - 9
display->write ("1337");
 A
---

F | | B -G-

E | | C

D

Public Member Functions

 TM1637 (uint8_t di, uint8_t dcki)
 
 ~TM1637 ()
 
mraa_result_t setBrightness (uint8_t level)
 
mraa_result_t setSegments (const uint8_t segments[], uint8_t length=4, uint8_t pos=0)
 
mraa_result_t write (std::string msg)
 
std::string name ()
 

Constructor & Destructor Documentation

TM1637 ( uint8_t  di,
uint8_t  dcki 
)

Instanciates a TM1637 object

Parameters
didata pin
dckiclock pin
~TM1637 ( )

TM1637 object destructor, this will close all used Gpio pins (di and dcki)

Member Function Documentation

mraa_result_t setBrightness ( uint8_t  level)

Set the brightness of the seven segment display

Parameters
levelThe brightness level of leds

Here is the caller graph for this function:

mraa_result_t setSegments ( const uint8_t  segments[],
uint8_t  length = 4,
uint8_t  pos = 0 
)

Set the the segment screen data and number of segments

Parameters
segmentsdata to write on the segments, each elemnt in array is segment
lengthnumber of elements in segments array
posdata writing offset

Here is the caller graph for this function:

mraa_result_t write ( std::string  msg)

Write message on the screen.

Parameters
msgThe message to be written on the sreen

Here is the call graph for this function:

std::string name ( )
inline

Return name of the component


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