Hey y'all!

I wound up here because I've decided to build myself a skeeball machine. The initial plan was just to have manual scoring, but in my searches for builds I found several really well done builds that had automatic scoring using Arduino or Raspberry PI. Note that this will not be happening right away. I have a few projects to finish at home first. I'm in R&D stage right now. I would expect this to begin in the spring most likely, once my shop has the current projects moved out and room has been made (both in the shop and on my calendar).

A little researching led me to believe Arduino will be best suited to that task for someone as green as I am over the PI.

The build of the table is carpentry I'm confident in. Actually mounting the sensors and the wiring is something I'm confident in. Writing the program, and knowing what to select as a display I'm not wholly confident in. I am fine with just a most basic LED display as the scoreboard.

I took a SQL class in high school and at the end of the year test was just a question or two short of being SQL certified, or whatever it was called. Not that I think that will help me or that I remember much of it, but I have, at least, a very basic understanding of writing a database, if>then statements, etc. I have a knack for teaching myself stuff with google at my fingertips and forums, youtube, etc.

I promise not to just ask for everything to be handed to me

Welcome to the Forum. Be sure to read How to get the best out of the Forum

Out of curiosity, what is "skeeball"?


It's an arcade game

I've downloaded an "Arduino for Dummies" book that I'm working through. That's me all day!

I've also found a fantastic Instructable where a fella built one and covered his designing and building of the scoreboard in detail. He even shared his code. I may be able to work backwards from it and make it work for me.

I was working my way through a free Python 3 course until I saw how different Python is from the version of C++ that Arduino uses. I'll focus on C++ for now and get back to Python later. The book covers some of my questions about how to choose the hardware for a project also.

// File = Skeeballgolfball5.ino
// 1/20/2020 Covert to basic 1-player after wrote 2-player version
// 1/26/2020 Added 100 point light
// 4/17/2020 Start modify to golfball size game.
// Used internal resistors on all switches (Push = LOW).
// 4/23/2020 Got single large 7-segment LED working (# of balls)
// 5/1/2020 Added LED light for each point hole (match LED in hole)
// 5/4/2020 Almost completed code, adapted well from oneplayerskeeball
// Added servo for drop down release of balls for new game.
// 5/2/2020 - Start building score board for top of machine.
#include // Enable this line if using Arduino Uno, Mega, etc.
#include "Adafruit_LEDBackpack.h"
Adafruit_7segment matrix = Adafruit_7segment();
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
//==============================Declare Servo======================
int servoPin = 12;
Servo Servo1;
int switch10Pin = 43;
int switch20Pin = 45;
int switch30Pin = 47;
int switch40Pin = 49;
int switch50Pin = 51;
int switch100Pin = 53;
int switchresetPin = 9;
int button10State = 1;
int button20State = 1;
int button30State = 1;
int button40State = 1;
int button50State = 1;
int button100State = 1;
int buttonresetState = 1;
int totalscore;
int noballs;
int redball;
//============================Large 7-segment=================================
byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 }, // = 0
{ 0,1,1,0,0,0,0 }, // = 1
{ 1,1,0,1,1,0,1 }, // = 2
{ 1,1,1,1,0,0,1 }, // = 3
{ 0,1,1,0,0,1,1 }, // = 4
{ 1,0,1,1,0,1,1 }, // = 5
{ 1,0,1,1,1,1,1 }, // = 6
{ 1,1,1,0,0,0,0 }, // = 7
{ 1,1,1,1,1,1,1 }, // = 8
{ 1,1,1,0,0,1,1 } // = 9
void sevenSegWrite(byte digit) {
byte pin = 2;
for (byte segCount = 0; segCount //10
pinMode(33, OUTPUT); //20
pinMode(35, OUTPUT); //30
pinMode(37, OUTPUT); //40
pinMode(39, OUTPUT); //50
pinMode(41, OUTPUT); //100
pinMode(A1, OUTPUT); //=== Game over LED
pinMode(A0, OUTPUT); //=== Red Ball next LED
pinMode(A2, OUTPUT); //=== New Game LED
//==============================Use internal resistor============
pinMode(switch10Pin, INPUT_PULLUP);
pinMode(switch20Pin, INPUT_PULLUP);
pinMode(switch30Pin, INPUT_PULLUP);
pinMode(switch40Pin, INPUT_PULLUP);
pinMode(switch50Pin, INPUT_PULLUP);
pinMode(switch100Pin, INPUT_PULLUP);
pinMode(switchresetPin, INPUT_PULLUP);
noballs = 0;
totalscore = 0;
redball = 1;
lcd.print("New Game!");
//======================================== 7-segment single digit====
void loop()
button10State = digitalRead(switch10Pin);
button20State = digitalRead(switch20Pin);
button30State = digitalRead(switch30Pin);
button40State = digitalRead(switch40Pin);
button50State = digitalRead(switch50Pin);
button100State = digitalRead(switch100Pin);
buttonresetState = digitalRead(switchresetPin);
//============================================= Check which button pushed above
if (buttonresetState == LOW)
totalscore = 0;
noballs = 0;
redball = 1;
digitalWrite(A1, LOW); //==Game Over LED
digitalWrite(A0, LOW); //==Red Ball LED
controlscoreled(48); //==Dummy pin-all point LEDs off
lcd.print(" New Game!");
//======================================== 7-segment single digit====
//===================================Drop door for balls=============
for (int i = 0, i //loop

I’ve downloaded an “Arduino for Dummies” book that I’m working through. That’s me all day!

If you want help with your code please click Report to Moderator and ask to have this Thread moved to the Programming section.

Also, when posting code please always use the code button </>

so your code looks like this

See How to get the best out of the Forum


Ah, sweet. Thanks!

I’ve also found a fantastic Instructable

Now there’s a phrase you don’t hear often.

const byte switch10Pin = 43;
const byte switch20Pin = 45;
// Etc.
int button10State; // you're going to read these
// variables every time through loop (), so
// a) why bother giving them a value here?
// b) why bother giving them global scope?
int button20State = 1;
int button30State = 1;
int button40State = 1;
int button50State = 1;
int button100State = 1;
int buttonresetState = 1;