POOLROOM SCOREKEEPER - 8*8 LED MATRIX w/5mm LEDS

Greetings all… I’ve developed and created the “Poolroom Scorekeeper Mini”. whoo hoo… well after hours and hours of work developing and then printing a custom enclosure, tests show that the individual numbers on the display are too small to see while streaming online.

Here’s a quick video showing the completed product:

see attached image to see what it looks like when viewing online.

also see attached image for the current LED modules I use… they are the standard 8*8 32x32mm times 4.

Its obviously too small to see and I need to make the displays BIGGER…

what would you suggest?? I was thinking 8*8 but making them 5mm LED size which would increase each letter by almost 4 times… I’m sure there are many other options and I’m wondering how you would do it… should I use a LED screen or maybe paper display?? any suggestions REALLY APPRECIATED!!

please also keep in mind the scorekeeper connected to the pool table is pointed almost downward so i will have to make a base so its tilted upwards which should increase the readability of it…

here is code for those interested…

#include <LedMatrix.h>
#include <cp437font.h>
/*
scorekeeper mini 4-26-20206
*/
//because there is a 3 second delay the player must wait until the LED lights up before they can release the button.
//the delay is useful for only recording and increase by 1 otherwise it will increase by 3 in one button push.

#define lowBatteryThresh 478 //**Connect a 1 Mega Ohm resister between the battery and lowBatteryIn.
#define lowBatteryIn A0 //**Connect a 500 Kilo Ohm resistor between lowBatteryIn and ground.
#define Rst 7
#define buttonDelay 250 //delay in microseconds, 1000 should equal 3 seconds for a button press

const int player1_up = 4; // the pin number of player1_up integer
const int player2_up = 2; // the pin number of player2_up integer

const int low_power_led = 12; // low power led pin

int player1_up_buttonState = 0;
int player2_up_buttonState = 0;
int player1_score = 0;
int player2_score = 0;

int loopCounter = 0;
#define matrix_1_count 4
#define cs_pin_1 10 //cs pin of first matrix connected to Arduino D3

LedMatrix mat(matrix_1_count, cs_pin_1);

void setup() {
// initialize serial:
Serial.begin(9600);

// initialize the pushbutton pin as an input:
pinMode(player1_up, INPUT);
pinMode(player2_up, INPUT);
pinMode(low_power_led, OUTPUT);
pinMode(lowBatteryIn, INPUT);
pinMode(Rst, INPUT);

mat.init();
mat.setIntensity(4);
mat.setTextAlignment(TEXT_ALIGN_LEFT);
mat.setCharWidth(8);
}

void loop() {
// read the state of the pushbutton value:

player1_up_buttonState = digitalRead(player1_up);
player2_up_buttonState = digitalRead(player2_up);

if (analogRead(lowBatteryIn) <= lowBatteryThresh) //test if the potential divider value is less than the threshold
digitalWrite(low_power_led, HIGH);
else
digitalWrite(low_power_led, LOW);

if (player1_up_buttonState == HIGH) {

while(digitalRead(player1_up));
changeScore(1, 1);
}

loopCounter = 0;

if (player2_up_buttonState == HIGH) {
while(digitalRead(player2_up));
changeScore(2, 1);
}

if(digitalRead(Rst)){
player1_score = 0;
player2_score = 0;

Serial.print(player1_score);
Serial.print(" ");
Serial.print(player2_score);
Serial.println();

}
writeScore();

}

void changeScore(int player, int by){
if (player == 1)
player1_score += by;
else if (player == 2)
player2_score += by;
else
Serial.println(“Undefined player number in function: changeScore()”);
}

void writeScore(){
String toShow = “”;
if (player1_score < 10)
toShow += “0”;
toShow += player1_score;
if (player2_score < 10)
toShow += “0”;
toShow += player2_score;

mat.setText(toShow);
mat.drawText();
mat.commit();
}

scorekeeper mini.jpg

Properly posted code does not contain smiley faces. Read the how to use this forum-please read sticky to see how to properly post code and some advice on how to ask an effective question. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code.

HTB1oUTpayzxK1Rjy1zkq6yHrVXax.jpg

scorekeeper mini.jpg
OK, first things first.

You need to go and read the forum instructions so that you can go back and modify your original post (not re-post it) - using the "More -> Modify" option below the right hand corner of your post - to mark up your code as such using the "</>" icon in the posting window. Just highlight each section of code (or output if you need to post that) from the IDE and click the icon.

In fact, the IDE itself has a "copy for forum" link to put these markings on a highlighted block for you so you then just paste it here in a posting window. But even before doing that, don't forget to use the "Auto-Format" (Ctrl-T) option first to make it easy to read. If you do not post it as "code" it can as you now see, be quite garbled and is always more difficult to read due to the font.

It is inappropriate to attach it as a ".ino" file unless it is clearly too long to include in the post proper. People can usually see the mistakes directly and do not want to have to actually load it in their own IDE. And even that would also assume they are using a PC and have the IDE running on that PC.

Also tidy up your blank space. Do use blank lines, but only single blanks between complete functional blocks.


OK, so now we have that said, since you are using the "FC-16" display modules I would recommend using Marco's "Parola" library to drive them. I believe it offers the option of driving displays constructed of two rows of those modules so you could use a row of 8 over a second row of 8. That would likely be cheaper as well as vastly easier than building your own matrix.

Alternatively there are other 16 by 32 arrays available - and in nicer colours - but I have not experience of them.