Skip to content

Commit e6e706f

Browse files
authored
Usage example of reverse indexing
Added usage example of reverse indexing to simpletest.
1 parent 3d79874 commit e6e706f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/tlc5947_simpletest.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@
5757
# Note if auto_write was disabled you need to call write on the parent to
5858
# make sure the value is written (this is not common, if disabling auto_write
5959
# you probably want to use the direct 12-bit raw access instead shown below).
60-
# tlc5947.write()
60+
# tlc5947.write()
6161

6262
# The other way to read and write channels is directly with each channel 12-bit
6363
# value and an item accessor syntax. Index into the TLC5947 with the channel
6464
# number (0-23) and get or set its 12-bit value (0-4095).
6565
# For example set channel 1 to 50% duty cycle.
66-
# tlc5947[1] = 2048
66+
#tlc5947[1] = 2048
67+
# Or set channel 23 (first channel from the end) to 2/3 duty cycle.
68+
#tlc5947[-1] = 2730
6769
# Again be sure to call write if you disabled auto_write.
6870
#tlc5947.write()

0 commit comments

Comments
 (0)