I am trying to use a 4 digit, 14 segment alphanumeric LED display driven from a Plasma Stick 2040W programmed in Micropython via an I2C interface. The display in question features a colon comprising two digits between the 2nd and 3rd digits. My basic problem is that I want to be able to turn this colon on and off independently from the rest of the display content. The code I have tried is:-
1 import plasma
2 from plasma import plasma2040
3 import time
4 from pimoroni_i2c import PimoroniI2C
6 PINS_PICO_EXPLORER = {“sda”:4, “scl”:5}
8 from ht16k33segment14 import HT16K33Segment14
10 i2c = PimoroniI2C(**PINS_PICO_EXPLORER)
11 led = HT16K33Segment14(i2c)
forgive the “clumsy” coding (I have copied snippets from various sources) but this basically works; the colon illuminates at line 13, followed 2 seconds later by the digits “1,2,3,4” on the display, but does not extinguish until the entire display does at line 24. I am afraid my coding skills do not allow me to analyse in detail the functioning of the ht16k33segment14 driver but feel sure the problem is buried in there somewhere. Any help/guidance would be greatly appreciated. mickf.
Hi Hel,
we have communicated in the past, probably on this topic. For your information I am the ClaytonDenbigh mentioned in the Github conversation and raised the original issue about the display colon. Certainly Tony Smith solved the problem of turning it On but what I want to do is also to turn it OFF so that I can make it flash.
I have imported the driver exactly as stated so I don’t think that’s the problem. I have looked at the driver code in Github (I have to be very careful as frankly I am not confident in Github and fear that I might inadvertently do damage) but although I can identify a “colon_on” function in the driver there does not appear to be a corresponding “colon_off”. I tried applying a bit of logic and added a parameter to colon_on; although it results in the colon turning On for “True” (but isn’t necessary as it turns On with a simple “colon_on()”), colon_on (False) doesn’t have any effect.
I understand that you can take this no further as the driver was written by a third party but as always, thank you for your prompt response. From another source I have been given contact details for the Sparkfun technical team so I shall try that route next.
Once again, thank you, (and watch out for the sharks!)
Ah I see - I wondered if you were the same poster!
It might be worth opening a fresh issue on the repo if led.set_colon(False).draw() isn’t working as expected - it’s easy to miss replies to closed ones.