Arduino Board Recommendation

Hi Guys, new to Arduino but looking to build an LED Strip Light Scoreboard (4 Digit/7 Segments per digit).

Each Digit will be connected to a 74HC595 shift register, so in total will have 4 shift registers and just wondering which Arduino board will be suitable to control the digits?

Not sure if a Pro Mini Arduino will have enough outputs or whether I’ll need something more like an Arduino Mega?

Looking to purchase in the next couple of days if someone can let me know what they think will be the better solution.

This is the thing for you. Have read then, ask again if it doesn’t answer your questions.

https://www.arduino.cc/en/tutorial/ShiftOut

That’s great Robin, so based on that info I should be able to get away with an Pro Mini Arduino or something like that only has a few digital outputs? I think the mini has 20 outputs if I understand it correctly… unless there’s an even simpler board I could use to then send the info to the shift registers?

Any of the Uno, Nano, or pro mini boards should work.

Remember that the Pro Mini does not have a USB port, and you need a means of loading sketches to the board, either an FTDI programmer, or another board to act as programmer.

The Nano isn’t much bigger than the Pro Mini, so give it a go.

1 Like

I actually have an FTDI programmer (had to use it to fix a camera gimbal controller on my drone years ago)… but the board I’m looking at which hopefully should do what I need is a Duinotech UNO r3 Development Board.

Not sure how much component knowledge you have but trying to piece together all the other components aside from the board now also…

Bit stuck on a couple, well the Shift Registers I think I have sorted (74HC595 8 Bit Serial In Serial Par Out Tri State Latch IC) but the transistors I’m a bit stuck on… each LED Strip segment will probably only be less than 5 inches long at max… There are two NPN transistors types I’m looking at and I think the difference between them (other than price) is the load rating, STP60NF06 N-channel 60A TO220 MOSFET & MTP3055VL N Channel TO-220 MOSFET Transistor… I think the latter is 15A rated, I can’t imagine 5 inches of LED strip would surpass that 15A of load surely.

You seem to be getting there pretty much by yourself.

I’ll point you to a YouTube video on transistor selection (it’s about selecting basic have-at-hand go to transistors for home).

1 Like

Slow process but I am working through it haha… thankyou for your help along the way it’s greatly appreciated…

And I have changed direction a little and actually think I’m going to go with a Nano now as I’m pretty sure I have a spare hidden at home somewhere which is a bonus!

Few more things to tick of on my list of planning before going shopping but it’s looking promising :slight_smile:

2 Likes

Hey Robin, I’m back again… In need of a little bit of additional help, having some issues getting things to work after wiring them up - but I have a feeling it may be how I’ve wired components.

I can try and draw up a schematic if it makes it easier.

I think the two main components I need advice on to check they are wired correctly are the MOSFET Transistors and the Shift Registers (Mainly the Transistors).

As I went with MOSFET MTP3055VL Transistors instead of the TIP-120 NPN Transistors I have seen used elsewhere I think I have already caused myself issues straight off the bat now as I wired these FETS as if they were TIP-120’s which means the drain and gate are wired backwards I’m no 99%% sure!!! I need to fix that now (x28 :slight_smile: ). I also need to demount the FETS as I’ve since learned the heat sink also is a drain and if they are all mounted on the same aluminium surface (which mine are) then they are all bridged together effectively - also not ideal!.

Again as per the original TIP-120’s that were used in a similar project elsewhere, there are 220hm resitors on the gate pin - if I keep these on there when I rewire the FETS will that cause me any brightness issues etc?

From what I can see so far the shift registers look to be wired correctly but I’m having a hard time testing given the transistor issue I’m working through.

Any advice you may be able to offer or anything I’ve missed or additionally need to add in (more resistors or anything etc.) please let me know. The LED segments are all wired common anode (and are supplied direct 12v feed) and the cathode goes to the transistors.

If I earth the aluminium frame they are mounted to I get full brightness with all lights on (given the MOSFET Transistors heat sinks are also currently mounted to this same aluminium base also) and makes sense since I’ve learned the heat sink also acts as a drain.

1 Like

Hey Brendan,

Glad to hear that your project is coming together. The aluminium heatsinks and frames could definitely be posing an issue in acting as an alternative path for current. My recommendation to try and eliminate that where possible is to use this heatsink thermal conductive tape to attach any devices that require passive cooling without causing any shorting. As for the transistors and resistor setup, as long as the current running through each of the LED is the same inferring that they’re all on the same potential difference and are all on a circuit of almost identical resistance the brightness should be consistent.

All the best with it! Be sure to post a photo when you’re done :slight_smile:

Bryce
Core Electronics | Support

Yep that was definitely the issue! Isolated all the FETS and its all working correctly now, have successfully run a test code which turns on each segment individually and runs through all 4 shift registers as I need.

Now comes the tough part in coding this all to do what I want, so far not having a huge amount of success, trying to decipher code from a previous project where someone did something similar (but different) but trying to decipher it and change it for what
I need is proving a challenge!

Brendan

1 Like

Hey Brendan,

Sounds like fun :smile:! Be sure to throw up any scripts that you’d like us to take a look at if you want any ideas for functions or implementation or want us to take a look at the syntax. Have a great day!

Bryce
Core Electronics | Support

So the test code below is the one that works and moves through each shift register -

/*

  • A random (between 1 and 4) number of leds follow the leader
    */
    #include <HC595.h>

const int chipCount = 4; // Number of serialy connected 74HC595 (8 maximum)
const int latchPin = 3; // Pin ST_CP (12) of the 74HC595
const int clockPin = 4; // Pin SH_CP (11) of the 74HC595
const int dataPin = 2; // Pin DS (14) of the 74HC595

//Constructor
HC595 ledArray(chipCount,latchPin,clockPin,dataPin);

int delayMs = 200;
int lastPin = ledArray.lastPin();

void setup() {
ledArray.reset();
randomSeed(analogRead(A0)); //nothing connected to A0
}

void loop() {
int followers = random(1,5);
for(int i = 0 ; i <= lastPin ; i++) {
ledArray.setPin(i, ON);
if (i >= followers) ledArray.setPin(i-followers, OFF);
delay(delayMs);
}
for (int i = lastPin-followers ; i <= lastPin; i++) {
ledArray.setPin(i, OFF);
delay(delayMs);
}
}

The code below is what I’ve started editing and is based on another project, the difference with this is that each shift register was individually connected back to an output on the Arduino whereas I am daisy chaining my shift registers which is the difficult part for me in trying to work out how/what I need to change for the below to work for my setup.

#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
#include <XC3718_codes.h>

/* Scoreboard Version 7.0 - FINAL
This is the code for a Softball scoreboard keeping double
digit score for visitor and home, innings, and outs.
Using the IR Remote library from:

IR Remote
http://arduino-info.wikispaces.com/IR-RemoteControl
based on code by Ken Shirriff - http://arcfn.com
Get Library at: https://github.com/shirriff/Arduino-IRremote
Unzip folder into Libraries.
RENAME folder “IRremote”

Also very helpful for use of the IR remote and the shift registers:
http://www.yourwarrantyisvoid.com/2012/07/10/hardware-remote-control-your-arduino/
This program controls a 7 segment LED with Shift Registers and IR remote

MY STUFF:
The scoreboard uses 4 Seven-Segment LEDs that are made up of LED strips
They are controlled by an Arduino Nano with 4 shift
registers using 3 pins only.


VISITOR HOME
_ _ _ _ |_| |_| |_| |_| |_| |_| |_| |_| tens ones tens ones

The LED strips use 12V for power and the Arduino cannot power that.
A 12V power supply is hooked up directly to +12v of each strip.
Each arduino pin goes to a MTP3055VL which in turn allows the current
to flow through to each individual LED strip.
___________ | |
| MTP3055VL | |___________|
G || D || || S || || ||
To Arduino Pin--|| || ||---to GROUND ' | (+12V)_____________________ ' |---To LED Segment_______________|__0___0___0____LED Segment */ /* Four (4) Shift Registers are used, 74HC595. Letters indicate segment of 7-Segment LED. A
| |
F B
|G|
| |
E C
|D|

Pin Designation for the shift Register as follows:

  1. B 16. +5V (X = not used)
  2. C 15. A
  3. D 14. Data
  4. E 13. GND
  5. F 12. Latch
  6. G 11. Clock
  7. X 10. +5V
  8. GND 9. X
    /
    /
    IR Receiver Pins
    _____ | |
    | IR | |_____|
    | | | | | |
    `To Arduino Pin#11 --| | |—to +5V Power
    ’ |
    ’ |—To GROUND
    */
    #include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

//Pin connected to ST_CP of 74HC595
int latchPin = 3;
//Pin connected to SH_CP of 74HC595
int clockPin = 4;
////Pin connected to DS of 74HC595
int dataPin = 2;

// Assign Shift Register Pins for Data, latch and Clock
int dataPinVT = 14; //Visitor Tens Shift Register
int latchPinVT = 12;
int clkPinVT = 11;
int dataPinVO = 30; //Visitor Ones Shift Register
int latchPinVO = 28;
int clkPinVO = 27;
int dataPinHT = 46; //Home Tens Shift Register
int latchPinHT = 44;
int clkPinHT = 43;
int dataPinHO = 62; //Home Ones Shift Register
int latchPinHO = 60;
int clkPinHO = 59;

// Initialize what will be displayed
int visitorTensDisplay = 0;
int visitorOnesDisplay = 0;
int homeTensDisplay = 0;
int homeOnesDisplay = 0;

// Set counters to zero for displays
int visitorCount = 0;
int homeCount = 0;

// Declare pins as outputs
void setup()
{
pinMode(latchPinVT, OUTPUT);
pinMode(clkPinVT, OUTPUT);
pinMode(dataPinVT, OUTPUT);
pinMode(latchPinVO, OUTPUT);
pinMode(clkPinVO, OUTPUT);
pinMode(dataPinVO, OUTPUT);
pinMode(latchPinHT, OUTPUT);
pinMode(clkPinHT, OUTPUT);
pinMode(dataPinHT, OUTPUT);
pinMode(latchPinHO, OUTPUT);
pinMode(clkPinHO, OUTPUT);
pinMode(dataPinHO, OUTPUT);

// Enable the IR stuff
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
// Initalize the displays

         visitorTensDisplay=127;
         visitorOnesDisplay=127;  
         homeTensDisplay=127;
         homeOnesDisplay=127;

// Not sure, I think this maps the seven segments
// VISITOR TENS AND ONES
digitalWrite(latchPinVT, LOW);
shiftOut(dataPinVT,clkPinVT,MSBFIRST,visitorTensDisplay);
digitalWrite(latchPinVT, HIGH);

digitalWrite(latchPinVO, LOW);
shiftOut(dataPinVO,clkPinVO,MSBFIRST,visitorOnesDisplay);
digitalWrite(latchPinVO, HIGH);

// HOME TENS AND ONES
digitalWrite(latchPinHT, LOW);
shiftOut(dataPinHT,clkPinHT,MSBFIRST,homeTensDisplay);
digitalWrite(latchPinHT, HIGH);

digitalWrite(latchPinHO, LOW);
shiftOut(dataPinHO,clkPinHO,MSBFIRST,homeOnesDisplay);
digitalWrite(latchPinHO, HIGH);

}

void loop() {
// IR stuff: basically decodes the keypress from the remote in a switch case
if (irrecv.decode(&results)) {

switch (results.value)  
{
case 0xFF11EE:  
  Serial.println("Dog"); 
  break;
case 0xFF619E:  // POWER  (Resets all all counts to 0)
  for(int i=0; i<3; i++){
    visitorTensDisplay=127;
    visitorOnesDisplay=127;  
    homeTensDisplay=127;
    homeOnesDisplay=127;
    delay(1000);
    visitorTensDisplay=0;
    visitorOnesDisplay=0;  
    homeTensDisplay=0;
    homeOnesDisplay=0;
    delay(1000); 
  }

  Serial.println("Power button"); 
  break;
case 0xFFA15E:  
  Serial.println("Mute"); 
  break;
case 0xFF30CF:  
  Serial.println("One"); 
  break;
case 0xFF18E7:  
  Serial.println("Two"); 
  break;
case 0xFF7A85:  
  Serial.println("Three"); 
  break;
case 0xFF10EF:  
  Serial.println("Four"); 
  break;
case 0xFF38C7:  
  Serial.println("Five"); 
  break;
case 0xFF5AA5:  
  Serial.println("Six"); 
  break;
case 0xFF42BD:  
  Serial.println("Seven"); 
  break;
case 0xFF4AB5:  
  Serial.println("Eight"); 
  break;
case 0xFF52AD:  
  Serial.println("Nine"); 
  break;
case 0xFF6897:  
  Serial.println("Zero"); 
  break;
case 0xFF629D:  // UP (increases the visitor count by one)
  visitorCount = visitorCount+1;
  if(visitorCount>99){  // after 99 runs, counter goes back to 0
    visitorCount = 0;     
  }
  Serial.println("CH"); 
  break;
case 0xFFA25D:  // DOWN (decreases the visitor count by one)
  visitorCount = visitorCount-1; 
  if(visitorCount<0){
    visitorCount = 0;
  } 
  Serial.println("CH-"); 
  break;
case 0xFF22DD:  // LEFT  (decreases the home count by one)
  homeCount = homeCount-1;
  if(homeCount<0){
    homeCount=0;
  }  
  Serial.println("<<"); 
  break;
case 0xFF02FD:  // RIGHT  (increases the home count by one)
  homeCount = homeCount+1;
  if(homeCount>99){  // after 99 runs, counter goes back to 0 and no negative counts
    homeCount = 0;     
  } 
  Serial.println(">>"); 
  break;
case 0xFF39C6:  
  Serial.println("Menu"); 
  break;
case 0xFFF10E:  
  Serial.println("Display"); 
  break;
case 0xFFC936:  
  Serial.println("Band"); 
  break;
case 0xFFE916:  
  Serial.println("Memory"); 
  break;
case 0xFFB946:  
  Serial.println("Return"); 
  break;
case 0xFF718E:  
  Serial.println("Radio"); 
  break;        
}
delay(100);

// Visitor Count Switch-case, displays Visitor score from 0-99
switch (visitorCount){
case 0:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 63;
  break;
case 1:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 6;      
  break;
case 2:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 91;    
  break;
case 3:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 79;    
  break;
case 4:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 102;    
  break;
case 5:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 109;
  break;
case 6:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 125;
  break;
case 7:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 7;
  break;
case 8:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 127;
  break;
case 9:
  visitorTensDisplay = 0;
  visitorOnesDisplay = 111;
  break;
case 10:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 63;
  break; 
case 11:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 6;      
  break;
case 12:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 91;    
  break;
case 13:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 79;    
  break;
case 14:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 102;    
  break;
case 15:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 109;
  break;
case 16:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 125;
  break;
case 17:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 7;
  break;
case 18:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 127;
  break;
case 19:
  visitorTensDisplay = 6;
  visitorOnesDisplay = 111;
  break;
case 20:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 63;
  break; 
case 21:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 6;      
  break;
case 22:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 91;    
  break;
case 23:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 79;    
  break;
case 24:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 102;    
  break;
case 25:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 109;
  break;
case 26:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 125;
  break;
case 27:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 7;
  break;
case 28:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 127;
  break;
case 29:
  visitorTensDisplay = 91;
  visitorOnesDisplay = 111;
  break;
case 30:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 63;
  break; 
case 31:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 6;      
  break;
case 32:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 91;    
  break;
case 33:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 79;    
  break;
case 34:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 102;    
  break;
case 35:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 109;
  break;
case 36:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 125;
  break;
case 37:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 7;
  break;
case 38:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 127;
  break;
case 39:
  visitorTensDisplay = 79;
  visitorOnesDisplay = 111;
  break;
case 40:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 63;
  break; 
case 41:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 6;      
  break;
case 42:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 91;    
  break;
case 43:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 79;    
  break;
case 44:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 102;    
  break;
case 45:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 109;
  break;
case 46:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 125;
  break;
case 47:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 7;
  break;
case 48:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 127;
  break;
case 49:
  visitorTensDisplay = 102;
  visitorOnesDisplay = 111;
  break;
case 50:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 63;
  break; 
case 51:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 6;      
  break;
case 52:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 91;    
  break;
case 53:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 79;    
  break;
case 54:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 102;    
  break;
case 55:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 109;
  break;
case 56:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 125;
  break;
case 57:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 7;
  break;
case 58:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 127;
  break;
case 59:
  visitorTensDisplay = 109;
  visitorOnesDisplay = 111;
  break;
case 60:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 63;
  break; 
case 61:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 6;      
  break;
case 62:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 91;    
  break;
case 63:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 79;    
  break;
case 64:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 102;    
  break;
case 65:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 109;
  break;
case 66:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 125;
  break;
case 67:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 7;
  break;
case 68:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 127;
  break;
case 69:
  visitorTensDisplay = 125;
  visitorOnesDisplay = 111;
  break;
case 70:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 63;
  break; 
case 71:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 6;      
  break;
case 72:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 91;    
  break;
case 73:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 79;    
  break;
case 74:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 102;    
  break;
case 75:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 109;
  break;
case 76:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 125;
  break;
case 77:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 7;
  break;
case 78:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 127;
  break;
case 79:
  visitorTensDisplay = 7;
  visitorOnesDisplay = 111;
  break;
case 80:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 63;
  break; 
case 81:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 6;      
  break;
case 82:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 91;    
  break;
case 83:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 79;    
  break;
case 84:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 102;    
  break;
case 85:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 109;
  break;
case 86:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 125;
  break;
case 87:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 7;
  break;
case 88:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 127;
  break;
case 89:
  visitorTensDisplay = 127;
  visitorOnesDisplay = 111;
  break;
case 90:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 63;
  break; 
case 91:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 6;      
  break;
case 92:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 91;    
  break;
case 93:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 79;    
  break;
case 94:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 102;    
  break;
case 95:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 109;
  break;
case 96:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 125;
  break;
case 97:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 7;
  break;
case 98:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 127;
  break;
case 99:
  visitorTensDisplay = 111;
  visitorOnesDisplay = 111;
  break;
  // Home Count Switch-case, displays Home score from 0-99
}
switch (homeCount){
case 0:
  homeTensDisplay = 0;
  homeOnesDisplay = 63;
  break;
case 1:
  homeTensDisplay = 0;
  homeOnesDisplay = 6;      
  break;
case 2:
  homeTensDisplay = 0;
  homeOnesDisplay = 91;    
  break;
case 3:
  homeTensDisplay = 0;
  homeOnesDisplay = 79;    
  break;
case 4:
  homeTensDisplay = 0;
  homeOnesDisplay = 102;    
  break;
case 5:
  homeTensDisplay = 0;
  homeOnesDisplay = 109;
  break;
case 6:
  homeTensDisplay = 0;
  homeOnesDisplay = 125;
  break;
case 7:
  homeTensDisplay = 0;
  homeOnesDisplay = 7;
  break;
case 8:
  homeTensDisplay = 0;
  homeOnesDisplay = 127;
  break;
case 9:
  homeTensDisplay = 0;
  homeOnesDisplay = 111;
  break;
case 10:
  homeTensDisplay = 6;
  homeOnesDisplay = 63;
  break; 
case 11:
  homeTensDisplay = 6;
  homeOnesDisplay = 6;      
  break;
case 12:
  homeTensDisplay = 6;
  homeOnesDisplay = 91;    
  break;
case 13:
  homeTensDisplay = 6;
  homeOnesDisplay = 79;    
  break;
case 14:
  homeTensDisplay = 6;
  homeOnesDisplay = 102;    
  break;
case 15:
  homeTensDisplay = 6;
  homeOnesDisplay = 109;
  break;
case 16:
  homeTensDisplay = 6;
  homeOnesDisplay = 125;
  break;
case 17:
  homeTensDisplay = 6;
  homeOnesDisplay = 7;
  break;
case 18:
  homeTensDisplay = 6;
  homeOnesDisplay = 127;
  break;
case 19:
  homeTensDisplay = 6;
  homeOnesDisplay = 111;
  break;
case 20:
  homeTensDisplay = 91;
  homeOnesDisplay = 63;
  break; 
case 21:
  homeTensDisplay = 91;
  homeOnesDisplay = 6;      
  break;
case 22:
  homeTensDisplay = 91;
  homeOnesDisplay = 91;    
  break;
case 23:
  homeTensDisplay = 91;
  homeOnesDisplay = 79;    
  break;
case 24:
  homeTensDisplay = 91;
  homeOnesDisplay = 102;    
  break;
case 25:
  homeTensDisplay = 91;
  homeOnesDisplay = 109;
  break;
case 26:
  homeTensDisplay = 91;
  homeOnesDisplay = 125;
  break;
case 27:
  homeTensDisplay = 91;
  homeOnesDisplay = 7;
  break;
case 28:
  homeTensDisplay = 91;
  homeOnesDisplay = 127;
  break;
case 29:
  homeTensDisplay = 91;
  homeOnesDisplay = 111;
  break;
case 30:
  homeTensDisplay = 79;
  homeOnesDisplay = 63;
  break; 
case 31:
  homeTensDisplay = 79;
  homeOnesDisplay = 6;      
  break;
case 32:
  homeTensDisplay = 79;
  homeOnesDisplay = 91;    
  break;
case 33:
  homeTensDisplay = 79;
  homeOnesDisplay = 79;    
  break;
case 34:
  homeTensDisplay = 79;
  homeOnesDisplay = 102;    
  break;
case 35:
  homeTensDisplay = 79;
  homeOnesDisplay = 109;
  break;
case 36:
  homeTensDisplay = 79;
  homeOnesDisplay = 125;
  break;
case 37:
  homeTensDisplay = 79;
  homeOnesDisplay = 7;
  break;
case 38:
  homeTensDisplay = 79;
  homeOnesDisplay = 127;
  break;
case 39:
  homeTensDisplay = 79;
  homeOnesDisplay = 111;
  break;
case 40:
  homeTensDisplay = 102;
  homeOnesDisplay = 63;
  break; 
case 41:
  homeTensDisplay = 102;
  homeOnesDisplay = 6;      
  break;
case 42:
  homeTensDisplay = 102;
  homeOnesDisplay = 91;    
  break;
case 43:
  homeTensDisplay = 102;
  homeOnesDisplay = 79;    
  break;
case 44:
  homeTensDisplay = 102;
  homeOnesDisplay = 102;    
  break;
case 45:
  homeTensDisplay = 102;
  homeOnesDisplay = 109;
  break;
case 46:
  homeTensDisplay = 102;
  homeOnesDisplay = 125;
  break;
case 47:
  homeTensDisplay = 102;
  homeOnesDisplay = 7;
  break;
case 48:
  homeTensDisplay = 102;
  homeOnesDisplay = 127;
  break;
case 49:
  homeTensDisplay = 102;
  homeOnesDisplay = 111;
  break;
case 50:
  homeTensDisplay = 109;
  homeOnesDisplay = 63;
  break; 
case 51:
  homeTensDisplay = 109;
  homeOnesDisplay = 6;      
  break;
case 52:
  homeTensDisplay = 109;
  homeOnesDisplay = 91;    
  break;
case 53:
  homeTensDisplay = 109;
  homeOnesDisplay = 79;    
  break;
case 54:
  homeTensDisplay = 109;
  homeOnesDisplay = 102;    
  break;
case 55:
  homeTensDisplay = 109;
  homeOnesDisplay = 109;
  break;
case 56:
  homeTensDisplay = 109;
  homeOnesDisplay = 125;
  break;
case 57:
  homeTensDisplay = 109;
  homeOnesDisplay = 7;
  break;
case 58:
  homeTensDisplay = 109;
  homeOnesDisplay = 127;
  break;
case 59:
  homeTensDisplay = 109;
  homeOnesDisplay = 111;
  break;
case 60:
  homeTensDisplay = 125;
  homeOnesDisplay = 63;
  break; 
case 61:
  homeTensDisplay = 125;
  homeOnesDisplay = 6;      
  break;
case 62:
  homeTensDisplay = 125;
  homeOnesDisplay = 91;    
  break;
case 63:
  homeTensDisplay = 125;
  homeOnesDisplay = 79;    
  break;
case 64:
  homeTensDisplay = 125;
  homeOnesDisplay = 102;    
  break;
case 65:
  homeTensDisplay = 125;
  homeOnesDisplay = 109;
  break;
case 66:
  homeTensDisplay = 125;
  homeOnesDisplay = 125;
  break;
case 67:
  homeTensDisplay = 125;
  homeOnesDisplay = 7;
  break;
case 68:
  homeTensDisplay = 125;
  homeOnesDisplay = 127;
  break;
case 69:
  homeTensDisplay = 125;
  homeOnesDisplay = 111;
  break;
case 70:
  homeTensDisplay = 7;
  homeOnesDisplay = 63;
  break; 
case 71:
  homeTensDisplay = 7;
  homeOnesDisplay = 6;      
  break;
case 72:
  homeTensDisplay = 7;
  homeOnesDisplay = 91;    
  break;
case 73:
  homeTensDisplay = 7;
  homeOnesDisplay = 79;    
  break;
case 74:
  homeTensDisplay = 7;
  homeOnesDisplay = 102;    
  break;
case 75:
  homeTensDisplay = 7;
  homeOnesDisplay = 109;
  break;
case 76:
  homeTensDisplay = 7;
  homeOnesDisplay = 125;
  break;
case 77:
  homeTensDisplay = 7;
  homeOnesDisplay = 7;
  break;
case 78:
  homeTensDisplay = 7;
  homeOnesDisplay = 127;
  break;
case 79:
  homeTensDisplay = 7;
  homeOnesDisplay = 111;
  break;
case 80:
  homeTensDisplay = 127;
  homeOnesDisplay = 63;
  break; 
case 81:
  homeTensDisplay = 127;
  homeOnesDisplay = 6;      
  break;
case 82:
  homeTensDisplay = 127;
  homeOnesDisplay = 91;    
  break;
case 83:
  homeTensDisplay = 127;
  homeOnesDisplay = 79;    
  break;
case 84:
  homeTensDisplay = 127;
  homeOnesDisplay = 102;    
  break;
case 85:
  homeTensDisplay = 127;
  homeOnesDisplay = 109;
  break;
case 86:
  homeTensDisplay = 127;
  homeOnesDisplay = 125;
  break;
case 87:
  homeTensDisplay = 127;
  homeOnesDisplay = 7;
  break;
case 88:
  homeTensDisplay = 127;
  homeOnesDisplay = 127;
  break;
case 89:
  homeTensDisplay = 127;
  homeOnesDisplay = 111;
  break;
case 90:
  homeTensDisplay = 111;
  homeOnesDisplay = 63;
  break; 
case 91:
  homeTensDisplay = 111;
  homeOnesDisplay = 6;      
  break;
case 92:
  homeTensDisplay = 111;
  homeOnesDisplay = 91;    
  break;
case 93:
  homeTensDisplay = 111;
  homeOnesDisplay = 79;    
  break;
case 94:
  homeTensDisplay = 111;
  homeOnesDisplay = 102;    
  break;
case 95:
  homeTensDisplay = 111;
  homeOnesDisplay = 109;
  break;
case 96:
  homeTensDisplay = 111;
  homeOnesDisplay = 125;
  break;
case 97:
  homeTensDisplay = 111;
  homeOnesDisplay = 7;
  break;
case 98:
  homeTensDisplay = 111;
  homeOnesDisplay = 127;
  break;
case 99:
  homeTensDisplay = 111;
  homeOnesDisplay = 111;
  break;
}
digitalWrite(latchPinVT, LOW);
shiftOut(dataPinVT,clkPinVT,MSBFIRST,visitorTensDisplay);
digitalWrite(latchPinVT, HIGH);

digitalWrite(latchPinVO, LOW);
shiftOut(dataPinVO,clkPinVO,MSBFIRST,visitorOnesDisplay);
digitalWrite(latchPinVO, HIGH);

digitalWrite(latchPinHT, LOW);
shiftOut(dataPinHT,clkPinHT,MSBFIRST,homeTensDisplay);
digitalWrite(latchPinHT, HIGH);

digitalWrite(latchPinHO, LOW);
shiftOut(dataPinHO,clkPinHO,MSBFIRST,homeOnesDisplay);
digitalWrite(latchPinHO, HIGH);   
//IR STUFF
irrecv.resume(); // Receive the next value

}
}

1 Like

I would suggest starting with something simpler as a starting point. Most of the code in your example is dealing with the use of the IR remote, and unless you are using this method of control, is totally unimportant.

A nice simple example is here.

https://www.arduino.cc/en/Tutorial/ShftOut13

Note that the latch pin is off while data is clocked into the registers (all bytes not just one) and then set to one to enable the data to the chip output.

By changing the value of the elements in the dataArray such that you set what segments of the 7seg display are on, you can then light up the scoreboard.

Start simple, it’s so much easier to understand, and learn. Note all the comments in the code.

2 Likes