Very helpful thanks! I just have a question with "printNumber3" If you have large digits that descent into small one for example 10000 -> 10 then the highest digits will still be there, is there a way to automatically reset those so they turn off?
@@BasonTech I tried that first, but it doesn't work because i have rapidly changing numbers. However i found a solution: void printNumber3(long number) { // Array of 8 bytes for each postion on the LED display byte digits[8] = {0, 0, 0, 0, 0, 0, 0, 0}; // Loop over each position to determine the number to show for (int i; i < 8; i++) { digits[i] = number % 10; number = number / 10; } // True when we've found the first non-zero digit bool firstNonZeroFound = false; for (int i = 7; i >= 0; i--) { // If the number is not equal to 0 if(digits[i] != 0) { firstNonZeroFound = true; } // Here is the solution i found :) if (firstNonZeroFound) { lc.setDigit(0, i, digits[i], false);} else{ lc.setRow(0, i, B00000000) ;} } }
Great! Btw it is quite common to arrange the accolades in an if/else structure like: if (firstNonZeroFound) { lc.setDigit(0, i, digits[i], false); } else { lc.setRow(0, i, B00000000); } This makes it easier to see the "code blocks" 😃
Hi! Very cool tutorial! I just built it! I tried to modify it (printNumber3) to use 2 displays and 16 bytes, with "long" number instead "int". It's working but I don't know how to show the numbers greater than eight bytes on the other display. Could you maybe give me some help ?!
Divide number by 1, 10, 100 etc and then you know which digit to draw on which position. More info about modulo at: en.wikipedia.org/wiki/Modulo_operation
Bas on Tech i mean isn’t the GND always connected with GND ( negative) ? And always the VCC connected with 5 Volt , how you connected from GND to 5Volt ?
Hey zou je aub een video kunnen maken over hou je een 7 segment LED display maakt met LED zelf. En hou je die kan laten branden met arduino en een rtc als mogelijk is. Het zou men leven veel makkelijker maken ik bind namelijk niet genoeg informatie daarover. Ik ben echt een grote fan van je video’s groetjes.
Je bedoelt dat je 7 losse LED's hebt en die dan apart aanstuurt? Via 7 uitgangen op je Arduino kun je 7 LED's aansturen een andere optie is om met een losse MAX7219 chip te werken, maar dan is het bordje uit deze video veel makkelijker. Wist je trouwens dat er ook een Nederlandse versie van de video is op ruclips.net/video/KFC_bQmroko/видео.html
Bas on Tech ja maar ik heb een proefwerk waar ik alleen losse led mag gebruiken. En ik heb geen idee hoe ik moet beginnen. Dank u wel om te antwoorden en ik heb al alle video’s gezien van het Nederlands kanaal. Groetjes
Ik kan moeilijk je proefwerk gaan maken 😉 Kijk nog eens goed naar de les over hoe je 1 LED aanzet, probeer dan vervolgens deze uit te breiden naar 2 LED's en zo verder.
Thankyou. Very clear. I started playing with arduinos again and had totally forgotten how to do the 7 segment x 8.
Great to hear, thanks! 😃
Beautiful work there!
Thanks! 😃
Great video. This was very helpful.
Thanks! 😃
Very useful tutorial,
My friend theres something wrong in your video titles or tags. You deserve more views.
Thanx for the greate tutorial 💞
Thanks! 😃
Great tutorial thanks
Great to hear! Thanks! 😃
ty so much
You're welcome! 😃
How to show data on three different max7219 seven segment display kindly make a vedio on cascade of max7219
You can just connect the output of the first with the input for the next one. The max7219 are chainable 😃
Thank you
You're welcome! 😃
Very helpful thanks! I just have a question with "printNumber3" If you have large digits that descent into small one for example 10000 -> 10 then the highest digits will still be there, is there a way to automatically reset those so they turn off?
Nice question! It is probably the easiest to just turn of every segment before changing to a new digit 😃
@@BasonTech I tried that first, but it doesn't work because i have rapidly changing numbers. However i found a solution:
void printNumber3(long number) {
// Array of 8 bytes for each postion on the LED display
byte digits[8] = {0, 0, 0, 0, 0, 0, 0, 0};
// Loop over each position to determine the number to show
for (int i; i < 8; i++) {
digits[i] = number % 10;
number = number / 10;
}
// True when we've found the first non-zero digit
bool firstNonZeroFound = false;
for (int i = 7; i >= 0; i--) {
// If the number is not equal to 0
if(digits[i] != 0) {
firstNonZeroFound = true;
}
// Here is the solution i found :)
if (firstNonZeroFound) {
lc.setDigit(0, i, digits[i], false);}
else{
lc.setRow(0, i, B00000000) ;}
}
}
Great! Btw it is quite common to arrange the accolades in an if/else structure like:
if (firstNonZeroFound) {
lc.setDigit(0, i, digits[i], false);
} else {
lc.setRow(0, i, B00000000);
}
This makes it easier to see the "code blocks" 😃
@@BasonTech Oh i will keep that in mind :)
Hi!
Very cool tutorial! I just built it!
I tried to modify it (printNumber3) to use 2 displays and 16 bytes, with "long" number
instead "int".
It's working but I don't know how to show the numbers greater than eight bytes on the other display.
Could you maybe give me some help ?!
Thanks! :)
Have you tried to use modulo to split a number into positions in an array?
@@BasonTech No, not shure how to do it :)
Divide number by 1, 10, 100 etc and then you know which digit to draw on which position. More info about modulo at: en.wikipedia.org/wiki/Modulo_operation
Ok. I'll try it. Thank you very much. I look forward for your future videos
How you connect GND to 5V ???
Sorry, can you be a bit more specific?
Bas on Tech i mean isn’t the GND always connected with GND ( negative) ? And always the VCC connected with 5 Volt , how you connected from GND to 5Volt ?
Bas on Tech im sorry I didn’t notice it 😅
Hey zou je aub een video kunnen maken over hou je een 7 segment LED display maakt met LED zelf. En hou je die kan laten branden met arduino en een rtc als mogelijk is. Het zou men leven veel makkelijker maken ik bind namelijk niet genoeg informatie daarover. Ik ben echt een grote fan van je video’s groetjes.
Je bedoelt dat je 7 losse LED's hebt en die dan apart aanstuurt? Via 7 uitgangen op je Arduino kun je 7 LED's aansturen een andere optie is om met een losse MAX7219 chip te werken, maar dan is het bordje uit deze video veel makkelijker. Wist je trouwens dat er ook een Nederlandse versie van de video is op ruclips.net/video/KFC_bQmroko/видео.html
Bas on Tech ja maar ik heb een proefwerk waar ik alleen losse led mag gebruiken. En ik heb geen idee hoe ik moet beginnen. Dank u wel om te antwoorden en ik heb al alle video’s gezien van het Nederlands kanaal.
Groetjes
Ik kan moeilijk je proefwerk gaan maken 😉 Kijk nog eens goed naar de les over hoe je 1 LED aanzet, probeer dan vervolgens deze uit te breiden naar 2 LED's en zo verder.
By you accent I am sure that you are Dutch.😊
Born and raised! 😄 As long as you understand what I say I am happy 😃
Hello. I shared this on facebook. Hope this is OK for you
Sure! As long as you share the link and not download the video and re-upload it to Facebook. Thanks!
Thankyou@@BasonTech