extra coding

I have manage to get one digit of my scoreboard up and working. I am using a sparkfun TPIC6C596 shift register and the code which is attached. What I need to do now is produce a code for a double digit and a treble digit. can someone help me out? One other question can all 3 (single, double and treble) work off one Arduino or do I have to use one for each unit? Again if possible can some one help me out. I am a complete novice and would like help please.

digitdriv.ino (3.9 KB)

What have you tried?

But first advice, drop the floats :wink:

And just try to make it as universal as possible. And to get some ideas, have a look at the sevseg llibrary. Or just look at others. You're not the first who tries this :slight_smile:

Septillion.

I have not tried anything. I don't know where to start.
what do you mean drop the floats.
The universal bit I don't understand.

In you're code you use floats as variable type. Drop them, use a integer like an int.

You made code to send data for one digit, the next digit is just a clone of that but needs to follow the first and you don't latch in between.

But I get the feeling you didn't write the code but merely copy pasted stuff...

Septillion.

Yes I did copy and pasted the codes. the first was a sparkfun code and the second one was for the two buttons. I am not trying to be lazy but without help I will never be able to do this project. I am trying to learn but at the moment I find it very deep. I have spent hours trying to find coding to match my project but have not yet found any.

groundsman:
Yes I did copy and pasted the codes.

Then it's time to go trough it line by line and understand them all. Without it there is no change (except pure luck) you're going to extend it to more digits.

Take baby steps when making code :slight_smile: And better not copy past without knowing what you do. Easier to just make a plan what you need to do (in small pieces) an fill it in.

groundsman:
I have spent hours trying to find coding to match my project but have not yet found any.

Although looking for matching code is a good thing, spending hours and hours on it is a wast of time which was wayyyyyy better spend and actually learning.

And yeah, there are many 7-segment libraries out there, a lot for multiplexed displays etc. But there is probably a library to match. But if you don't need to multiplex it's all not that hard and a nice project to begin with. :slight_smile: But then you'll have to do it all yourself, no copy past :wink: