Many questions about 7 segment display modules
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Many questions about 7 segment display modules
Keith,
Sounds good. i will see if I can get that schematic.
Sounds good. i will see if I can get that schematic.
Last edited by Kaellis991 on Thu Mar 23, 2023 9:40 pm, edited 1 time in total.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Many questions about 7 segment display modules
Hi,Kaellis991 wrote: ↑Thu Mar 23, 2023 8:26 pm Keith,
Sounds good. i will see if I can get that achematic.
Actually just run this code and tell me what the display shows. I should be able to work it out. No need to worry propwash. Is the module MAX7219 based?
Code: Select all
-- Create a new Max7219 based character display
display_chr_id = hw_chr_display_add("NAV1 frequency", "MAX7219", 1)
-- Set text "12345" on display 0 (first), line 0
hw_chr_display_set_text(display_chr_id, 0, 0, "123456.05")
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Many questions about 7 segment display modules
Keith,
Yes it is a 7219. As soon as I get the thing wired up on my breadboard I will do that.
Thanks
Yes it is a 7219. As soon as I get the thing wired up on my breadboard I will do that.
Thanks
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Many questions about 7 segment display modules
Hi,Kaellis991 wrote: ↑Thu Mar 23, 2023 9:45 pm Keith,
Yes it is a 7219. As soon as I get the thing wired up on my breadboard I will do that.
Thanks
57DC0949-9E15-4EB8-98EE-5842AAD751B2.jpeg
It is 01h38 by me now. I am waiting for the result or a image of the module when running that code. Please advise else I am off to bed and you will have to wait for tomorrow.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Many questions about 7 segment display modules
Keith,
Sorry that I wasn't clearer on when I will be able to do the wiring. It has to wait until this weekend.
Kirk
Sorry that I wasn't clearer on when I will be able to do the wiring. It has to wait until this weekend.
Kirk
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Many questions about 7 segment display modules
Hi,Kaellis991 wrote: ↑Fri Mar 24, 2023 2:22 pm Keith,
Sorry that I wasn't clearer on when I will be able to do the wiring. It has to wait until this weekend.
Kirk
No worries. I will keep an eye out for the image and will revert with a solution of sorts.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Many questions about 7 segment display modules
Keith,
I found some time this morning to connect the board and my Nano.
Here is the code I copied from you.
And a picture of the display running from my Nano.
I found some time this morning to connect the board and my Nano.
Here is the code I copied from you.
And a picture of the display running from my Nano.
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Many questions about 7 segment display modules
Keith,
I disconnected the arduino and reconnected, then ran the code and now get 506.54
I disconnected the arduino and reconnected, then ran the code and now get 506.54
-
- Posts: 581
- Joined: Mon Sep 07, 2020 8:49 am
Re: Many questions about 7 segment display modules
Just to play around with it I swapped the last two digits from .05 to .50
Now the display shows 056.54
So what is this telling us?
Obviously the display is reading right to left while the characters in the code are reading left to right.
Now the display shows 056.54
So what is this telling us?
Obviously the display is reading right to left while the characters in the code are reading left to right.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Many questions about 7 segment display modules
Hi,Kaellis991 wrote: ↑Fri Mar 24, 2023 4:05 pm Keith,
I disconnected the arduino and reconnected, then ran the code and now get 506.54
IMG_6675.JPG
That is a problem as the decimal is 2f but the display should have showed 50.654.
I want you to try this code. We might have to change it a lot to come up with a solution.
I have coded this way just so that it is easier to change things. We will optimize later.
Code: Select all
--Create a variable to simulate a value from the sim
sim_value = "123.05"
--Reverse the string
sim_value = string.reverse(sim_value)
--format the string
sim_value = string.format("% 9.3f",sim_value)
-- Create a new Max7219 based character display
display_chr_id = hw_chr_display_add("NAV1 frequency", "MAX7219", 1)
-- Set text to the manipulated sim string value
hw_chr_display_set_text(display_chr_id, 0, 0, sim_value)
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card