HT16K33 Class: Difference between revisions

Jump to navigation Jump to search
Line 286: Line 286:


=== setRow(port, row, data) ===
=== setRow(port, row, data) ===
Set the port / row buffer to data.
Considering 2 output port with eight output each. named '''A''' and '''B'''. Port '''A''' will manage output '''1...8''' regarding of the Common selected. Port '''B''' will drive output '''9-16''' in the same way.<br />
* port : '''A''' or '''B'''. Allow to choose witch range of output will be affected.
* row : Common Number [1...8]
Except for development or debugging and knowing what you are doing, there is no reason to invoke this method directly. It is a system method internal to the operation of the driver.
Except for development or debugging and knowing what you are doing, there is no reason to invoke this method directly. It is a system method internal to the operation of the driver.
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Line 295: Line 299:
>>> MODULE_HT16K33 = FGINT1.getModule('HT16K33')
>>> MODULE_HT16K33 = FGINT1.getModule('HT16K33')
>>> LEDPACK2 = MODULE_HT16K33('LEDPACK2', '0x71', 0)
>>> LEDPACK2 = MODULE_HT16K33('LEDPACK2', '0x71', 0)
>>> LEDPACK2.setRow('A', 1, 0x6D)
>>> LEDPACK2.setRow('A', 1, 0x6D) # Thhis will set the register of output 1 -> 8 (port A), Common 1 with the value 0x6D.
                                  # if an 7 segment displays was connected on this port, 0x6d display '5'.
>>>
>>>
</syntaxhighlight>
</syntaxhighlight>
But as most of device methodes, this one should be invoked directly only when developping new elements using HT16K33 devices


=== setOut(port, row, out, value) ===
=== setOut(port, row, out, value) ===
534

edits

Navigation menu