[Swlug] LED drivers (Alan Gray)
Rhys Sage
rhys_sage at yahoo.com
Fri Nov 29 01:16:54 UTC 2024
Alan,
I looked at the C++ code and you're right - the data is bidirectional. I see output being flipped to input in the code a few times.
One of the stranger things in the code is that they seem to want to refer to the TM1637 as I2C when it is categorically not an I2C device. I'm not quite sure why they're doing that. It is reminiscent of the bad Python code for a GPS module that I rewrote, cutting out 200 lines of (I called it nonsense) code that didn't seem to achieve anything other than being pretentious.
The problem I had was with the combination of demo software and library. I downloaded the demo software and the corresponding library, ran the demo software with the library and it didn't work - not on my Arduino Nano Every or on my Pi Pico (obviously Python code on on the Pico). I very much doubt that the brand new display is bad. I have 3 of them but all from the same supplier. It's my experience that a lot of downloaded software and libraries don't work. I've tried a couple of different libraries with demo software to no avail. That's why I downloaded the chip data sheet and am contemplating writing my own software.
Rhys Sage
On Thursday, 28 November 2024 at 07:00:06 GMT-5, swlug-request at mailman.lug.org.uk <swlug-request at mailman.lug.org.uk> wrote:
Send Swlug mailing list submissions to
swlug at mailman.lug.org.uk
To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/swlug
or, via email, send a message with subject or body 'help' to
swlug-request at mailman.lug.org.uk
You can reach the person managing the list at
swlug-owner at mailman.lug.org.uk
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Swlug digest..."
Today's Topics:
1. Re: LED drivers (Alan Gray) (Rhys Sage)
Thanks Alan, that's interesting. I had seen that library but hadn't tried i=
t. I'll have to try it over the weekend.
Looking at the article, it says:
"To display a digit, the TM1637 must receive 0x40 first (command 1) then a =
0xCX (command 2) where X is the position indicating which display to use. F=
or example, if a digit is to be on the 3rd display, then the second command=
should be 0xC2. The next byte is the encoded value of whatever character y=
ou want to display. Finally, the last byte is 0x8Y (command 3) where Y is t=
he 4-bit brightness of the display."
That, to me, looks as though there's a more complex microcontroller inside =
the TM1637 chip than I had thought possible.=20
I just looked at the C++ code for the library and printed it out. I'll have=
a scan through it maybe tomorrow. What puzzles me though is how to import =
the code into the Arduino IDE as a library that I can use repeatedly. I'll =
also have to work out a Python version for the Pi Pico.
At the moment my current project seems to be completing building a coil gun=
ready for use with a 3D gimbal, sonic rangefinder and to use it to defend =
my tabletop from some invading plastic soldiers attempting to steal my cup =
of tea. That's for a YouTube video, of course.
Rhys Sage
On Wednesday, 27 November 2024 at 08:47:39 GMT-5, swlug-request at mailman.lug=
.org.uk <swlug-request at mailman.lug.org.uk> wrote:=20
Send Swlug mailing list submissions to
=C2=A0=C2=A0=C2=A0 swlug at mailman.lug.org.uk
To subscribe or unsubscribe via the World Wide Web, visit
=C2=A0=C2=A0=C2=A0 https://mailman.lug.org.uk/mailman/listinfo/swlug
or, via email, send a message with subject or body 'help' to
=C2=A0=C2=A0=C2=A0 swlug-request at mailman.lug.org.uk
You can reach the person managing the list at
=C2=A0=C2=A0=C2=A0 swlug-owner at mailman.lug.org.uk
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Swlug digest..."
Today's Topics:
=C2=A0 1. Re: LED drivers (Alan Gray)
Have a look at <https://www.teachmemicro.com/how-to-use-tm1637-seven-segmen=
t-display/>
The info is useful, but beware the ads!
Regards
Alan Gray
_______________________________________________
Swlug mailing list
Swlug at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/swlug
_______________________________________________
Swlug mailing list
Swlug at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/swlug
More information about the Swlug
mailing list