Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7604

MicroPython • MAX7219 issue

$
0
0
To start with, I am a total beginner using Thonny and Micropython, but want to learn

I found this vey nice MAX7219 code and want to use it on a frequency counter.
https://github.com/pdwerryhouse/max7219_8digit

This code can show 2 "points" on the display, which I need.

The counter code (thank you horuable) viewtopic.php?f=146&t=306250&p=1832034#p1832034 gives a result of: 12345678 for example

I want the 7seg led to display a . after 3 and after 6. (Like this: 123.456.78)

I figured out if I use this: (If it is relevant)

Code:

              x=math.floor(freq)              print("{:,} Hz".format(x) )
I get this: 1,000,0000 Hz in the Thonny terminal (when the freq is 1000000 )
But this error:

File "<stdin>", line 176, in <module>
File "max7219_8digit.py", line 66, in write_to_buffer_with_dots
TypeError: object of type 'int' has no len()

How can I do that?

Thank you for any advice.

Joe

Statistics: Posted by jdev99 — Sun Jun 29, 2025 10:21 am



Viewing all articles
Browse latest Browse all 7604

Trending Articles