Top view of the chore scorekeeping device, showing the chalkboard scoreboard and 8 button, 2 player game.
The front view of the chore scorekeeping device, with the reset button and receipt printer visible.
I built this project to help me keep track of my chores and make the process of doing them a little bit more fun. To play the game, every time you do a chore on the scorekeeper you get to add points to your total. Eventually, after you do enough chores, a reward will print that you can either use or barter with housemates for a better reward. The rewards are tailored to the kinds of things me and my partner like to do, especially activities that we want to do but never find time for.
This Image shows a detailed shot of the receipt printer. The rewards print upside down for the viewer due to the orientation of the receipt printer
This Image shows a the arduino up close. Blue wires are all connected to the buttons, while green and yellow are connected to the receipt printer and LCD display.
This Image shows the button system In greater detail. Each player has 4 buttons.
This Image shows how the buttons are mounted to the board, as well as a little bit of the wiring for the protoboard.
In this video, I show how a user might Interact with the machine. Each time a player finishes a chore, they get to add points to the board. Once a player hits 750 points, the receipt printer will print a reward with a time frame for redeeming It. Some rewards are only valid for one week, while others are valid any time. High scores can be kept Indefinitiely, and the device will print a reward every 750 points.
Authors note: I mostly only took videos of my process, so much of these process "photos" are actually videos of things working or not working. Due to the limitations of alt text when it relates to videos, I've included "alt text" In the caption of what's inside of each video, as well as the normal caption
One of my biggest struggles during this process was getting the receipt printer to work consistently. Even when printing the test page, the printer would often only print half lines. I spent a lot of time AB testing different settings and browsing arduino forums for a fix. We're still not entirely sure what was causing the problem, but after meeting with Zach we ended up switching to a higher voltage power supply which seems to have fixed the problem. While the receipt printer should be able to operate off of a 5v supply, It was not printing correctly until we switched to a 9v supply.
This video shows a working prototype of the project, with most elements functioning. The gadget Is placed on a piece of scrap board, with 8 buttons arranged across the breadboard. There Is a receipt printer and display on the left side, showing the device point system working correctly.
I was glad to have a full physical prototype fairly early on, because that allowed me to fine tune some of the code. Building the prototype was a lot easier than I expected It to be.
this video shows a recording of a very early Iteration of my code. You can see some code at the top for creating buttons that added points, and then the serial monitor demonstrating the functioning button mechanic.
This video was taken after I wrote all the code for the buttons. I started by getting the buttons working with the serial monitor, that way I cound confidently move onto Implementing the display, which was a much easier task after our last project.
This Is an early version of the prototype, showing buttons that correctly turn on lights when pressed, but an LCD display that Isn't functioning properly.
'Here you can see that the display Initially wasn't showing anything. Fortunately I ran Into this problem with the last project so I knew what to do this time. The screen brightness just needed to be adjusted with the potentiometer behind It.
This video shows the nearly completed final box. All elements are Installed and most are working correctly, but the chalkboard on the right was not completed yet. The receipt printer and reset button are not pictured here.
This Is a working photo of the box after It was completed, but before I Input the score keeper on the chalkboard. It's a lot less interesting without the chalk! You can see two LED's to the side, unfortunately those are not functional due to limitations of the box, but I felt the hole looked better with something to fill It even If they're just decoration.
Overall, I think this project was really successful for me, though I did hit a few road bumps along the way. While I chose a very simple system, I think that served me well as I wasn't drowning in technical problems. I was actually pretty surprised by the things that ended up causing me the most trouble. While going into this project I expected that the coding and electrical wiring would be the most difficult, the source of most of my frustration ended up being the laser cutter and the receipt printer. Getting the box laser cut ended up taking almost an entire day, which I really didn't expect, and that set me back In other classes/schoolwork since I hadn't budgeted for It. Finally, I ran into a few Issues when it was time to solder the pushbutton wires and put the whole thing together. Since the buttons need to be mounted from the front before being soldered to the protoboard, it was pretty frustrating to do the wiring with 9 total buttons, and made it difficult to construct the box, which resulted in me needing to cut the LED indicators that were planned because there wasn't enough working room inside the box to add them. If I were to give advice for myself or someone else doing this project, I would suggest to start the laser cut a lot earlier, and to attaching the arcade buttons with much longer wires so that there's more working space, and use more screw terminals to make It easier to change. I used shorter wires to save space, but that caused me a lot of trouble In the long run.
My critique feedback mirrored a lot of my own feelings about this project, which was uplifting. I think quite often when you work on something and It doesn't quite reach "perfect" It can be hard to see that you still have something that's pretty dang good. One person commented that "In a future version, and Lenora mentioned this, it would be nice to have the light indicators working." which I wholeheartedly agree with. Unfortunately the solution to this would be quite involved, so I don't plan to implement It but I do wish the lights were working. I also got some positive feedback about the personalization of the box by using a chalkboard that could be changed, with one commenter saying "I liked the use of chalkboard paint and chalk pen for the scoreboard list of chores. It’s always nice to see various components and materials coming together in a physical computing project. It gives the project more character and personalization." I was glad the chalkboard was successful, and I'm excited that using chalkboard means the chores can be changed out whenever I want.
For the future of this project, I am thinking about changing the power so that the entire device can run on one cable, and If It were possible I would Implement the lights. I would also like to make some additions to my code to use EEPROM to store the score when the box Is unplugged. I also think a lot of Improvements can be made to the code to streamline the process. I know that there's a way to write this code In a lot less lines than I ended up using, but with my beginner level skill the method I used worked best for me.
/*
Project 2: Assistive Device for Yourself
60-223 Intro to Physical Computing
Code by Lenora Gant
Description: A chore tracker/game, where user can press push button and see
point value add to total high score
First, user presses button (4ish buttons)
This button press causes a certain # of points to be printed on LCD Screen
After point threshhold is achieved (every 500 points?); print receipt printer reward
Debouncing buttons tips:
if button is pressed and previously it was not pressed, then the button is pressed
if previously it was pressed, it does not press
Pin mapping:
Arduino pin | role | description
-------------------------------------
2 input lFivePtButton
3 input lTwentyFivePtButton
4 input lSeventyFivePtbutton
5 input lHundredFiftyPtbutton
6 input cFivePtbutton
7 input cTwentyFivePtbutton
8 input cSeventyFivePtbutton
9 input cHundredFiftyPtbutton
10 input ledOne Purple
11 input ledTwo Purple
12 input ledThree Blue
13 input ledFour Blue
A4+A5 output LCD screen
A1+A2 output thermal printer
A3 input resetSwitch
Steps:
1. Push button competition- top row is for player 1, bottom row is for player 2
each have 5, 25, 75, 150 buttons
2. Software reads button pressed
3. Depending on which button, add point value to each persons total high score
a. 20 pt button would add 20 points. if score was 50,
your total score becomes 70
4. Once user reaches point threshold for reward,
5. Print predetermined reward with thermal printer
6. Device is meant to be reset once per week
Code by Lenora Gant
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h> //library for LCD Screen
LiquidCrystal_I2C screen(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
//printer setup
#include "Adafruit_Thermal.h"
#include "SoftwareSerial.h"
#define TX_PIN A2 // Arduino transmit YELLOW WIRE labeled RX on printer
#define RX_PIN A1 // Arduino receive GREEN WIRE labeled TX on printer
SoftwareSerial mySerial(RX_PIN, TX_PIN); // Declare SoftwareSerial obj first
Adafruit_Thermal printer(&mySerial); // Pass addr to printer constructor
// Then see setup() function regarding serial & printer begin() calls.
//variables
//1 button
const int lFivePtPin = 2;
//5 button
const int lTwentyFivePtPin = 3;
//10 point button
const int lSeventyFivePtPin = 4;
//25 point button
const int lHundredFiftyPtPin = 5;
//50 point button
const int cFivePtPin = 6;
//75 button
const int cTwentyFivePtPin = 7;
//100 point button
const int cSeventyFivePtPin = 8;
//500 point button
const int cHundredFiftyPtPin = 9;
const int resetButton = A3;
const int ledOne = 10;
const int ledTwo = 11;
const int ledThree = 12;
const int ledFour = 13;
//array for rewards
const char* reward[] = {
"Redeem Anytime: Go to the movies at the theater!",
"Redeem Anytime: 1 sweet treat from the store! (Under $10)",
"Redeem Anytime: 1 bottle of wine from the store! (Under $15)",
"Redeem Anytime: Book a class you've been wanting to do!",
"Redeem Anytime: Buy a new game you've been thinking about!",
"Redeem Anytime: 1 Sims 4 kit!",
"Redeem Anytime: 1 Doordash order ($15 or less)",
"Redeem Anytime: 1 back massage from your competitor",
"Redeem Anytime: 1 hour of guilt free free time",
"Redeem Anytime: Use a bath bomb",
"Redeem Anytime: 1 free deep clean from your competitor",
"Redeem Anytime: Rent a movie you've wanted to watch",
"Redeem Anytime: Visit a used bookstore",
"Redeem Within the Week: 1 free chore from your competitor",
"Redeem Within the Week: Visit a local coffee shop",
"Redeem Within the Week: 1 free boba tea",
"Redeem Within the Week: 1 dog walk from your competitor",
"Redeem Within the Week: Go on a hike",
"Redeem Within the Week: 1 day off of tidying/chores",
"Redeem Within the Week: Grab a treat from a bakery"
};
//variables for session total
int lenoraButtonPushTotal = 0;
int chrisButtonPushTotal = 0;
//Lenora's 5 point button
int lFiveButtonState;
int lLastFiveButtonState;
//L's 25 point button
int lTwentyFiveButtonState = 0;
int lLastTwentyFiveButtonState = 0;
//L's 75 button
int lSeventyFiveButtonState = 0;
int lLastSeventyFiveButtonState = 0;
//L's 150 button
int lHundredFiftyButtonState = 0;
int lLastHundredFiftyButtonState = 0;
//Chris's 5 button
int cFiveButtonState = 0;
int cLastFiveButtonState = 0;
//C's 25
int cTwentyFiveButtonState = 0;
int cLastTwentyFiveButtonState = 0;
//C's 75
int cSeventyFiveButtonState = 0;
int cLastSeventyFiveButtonState = 0;
//C's 150
int cHundredFiftyButtonState = 0;
int cLastHundredFiftyButtonState = 0;
//for reward
int lLastPrintedVal = 0;
int cLastPrintedVal = 0;
//for reset button
int resetButtonState = 0;
int lastResetButtonState = 0;
void setup() {
pinMode(lFivePtPin, INPUT_PULLUP);
pinMode(lTwentyFivePtPin, INPUT_PULLUP);
pinMode(lSeventyFivePtPin, INPUT_PULLUP);
pinMode(lHundredFiftyPtPin, INPUT_PULLUP);
pinMode(cFivePtPin, INPUT_PULLUP);
pinMode(cTwentyFivePtPin, INPUT_PULLUP);
pinMode(cSeventyFivePtPin, INPUT_PULLUP);
pinMode(cHundredFiftyPtPin, INPUT_PULLUP);
pinMode(ledOne, OUTPUT);
pinMode(ledTwo, OUTPUT);
pinMode(ledThree, OUTPUT);
pinMode(ledFour, OUTPUT);
pinMode(resetButton, INPUT_PULLUP);
//initialize LCD
screen.display();
screen.init();
screen.backlight();
screen.home();
Wire.begin();
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: 0"));
// screen.setCursor(1,0);
// screen.print(String("C Total: 0"));
Serial.begin(19200);
mySerial.begin(19200);
//printer.setTimes(5000, 525);
printer.begin();
randomSeed(analogRead(A0));
}
void loop() {
// step 1: read all of the sensors
checkLFive();
checkLTwentyFive();
checkLSeventyFive();
checkLHundredFifty();
checkCFive();
checkCTwentyFive();
checkCSeventyFive();
checkCHundredFifty();
printLenoraReward();
printChrisReward();
checkResetButton();
//printLenora1750Reward();
// printChris1750Reward();
// a brief delay at the bottom of the loop is usually a good idea
delay(5);
}
void checkLFive()
{
//read the 1 point button input pin
lFiveButtonState = digitalRead(lFivePtPin);
//compare button state to previous button state
if (lFiveButtonState != lLastFiveButtonState)
{
//if the state has changed, add 1 to the counter
if (lFiveButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
lenoraButtonPushTotal = lenoraButtonPushTotal + 5; // ++ means plus 1
Serial.println("L1 on");
Serial.print ("Lenora's Point Total: ");
Serial.println(lenoraButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal)+ String("+5"));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
//digitalWrite(ledOne, HIGH);
//digitalWrite(ledTwo, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
// digitalWrite(ledOne, LOW);
//digitalWrite(ledTwo, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
lLastFiveButtonState = lFiveButtonState;
}
void checkLTwentyFive()
{
//read the 1 point button input pin
lTwentyFiveButtonState = digitalRead(lTwentyFivePtPin);
//compare button state to previous button state
if (lTwentyFiveButtonState != lLastTwentyFiveButtonState)
{
//if the state has changed, add 1 to the counter
if (lTwentyFiveButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
lenoraButtonPushTotal = lenoraButtonPushTotal + 25;
Serial.println("L2 on");
Serial.print ("Lenora's Point Total: ");
Serial.println(lenoraButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal)+ String("+25"));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
//digitalWrite(ledOne, HIGH);
//digitalWrite(ledTwo, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
//digitalWrite(ledOne, LOW);
//digitalWrite(ledTwo, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
lLastTwentyFiveButtonState = lTwentyFiveButtonState;
}
void checkLSeventyFive()
{
//read the 75 point button input pin
lSeventyFiveButtonState = digitalRead(lSeventyFivePtPin);
//compare button state to previous button state
if (lSeventyFiveButtonState != lLastSeventyFiveButtonState)
{
//if the state has changed, add 75 to the counter
if (lSeventyFiveButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
lenoraButtonPushTotal = lenoraButtonPushTotal + 75;
Serial.println("L3 on");
Serial.print ("Lenora's Point Total: ");
Serial.println(lenoraButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal)+ String("+75"));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
//digitalWrite(ledOne, HIGH);
//digitalWrite(ledTwo, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
//digitalWrite(ledOne, LOW);
//digitalWrite(ledTwo, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
lLastSeventyFiveButtonState = lSeventyFiveButtonState;
}
void checkLHundredFifty()
{
//read the 150 point button input pin
lHundredFiftyButtonState = digitalRead(lHundredFiftyPtPin);
//compare button state to previous button state
if (lHundredFiftyButtonState != lLastHundredFiftyButtonState)
{
//if the state has changed, add 150 to the counter
if (lHundredFiftyButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
lenoraButtonPushTotal = lenoraButtonPushTotal + 150;
Serial.println("L4 on");
Serial.print ("Lenora's Point Total: ");
Serial.println(lenoraButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal)+ String("+150"));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
//digitalWrite(ledOne, HIGH);
//digitalWrite(ledTwo, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
//digitalWrite(ledOne, LOW);
//digitalWrite(ledTwo, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
lLastHundredFiftyButtonState = lHundredFiftyButtonState;
}
void checkCFive()
{
//read the 1 point button input pin
cFiveButtonState = digitalRead(cFivePtPin);
//compare button state to previous button state
if (cFiveButtonState != cLastFiveButtonState)
{
//if the state has changed, add 1 to the counter
if (cFiveButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
chrisButtonPushTotal = chrisButtonPushTotal + 5; // ++ means plus 1
Serial.println("C1 on");
Serial.print ("Chris's Point Total: ");
Serial.println(chrisButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal)+ String("+5"));
//digitalWrite(ledThree, HIGH);
//digitalWrite(ledFour, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
//digitalWrite(ledThree, LOW);
//digitalWrite(ledFour, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
cLastFiveButtonState = cFiveButtonState;
}
void checkCTwentyFive()
{
//read the 1 point button input pin
cTwentyFiveButtonState = digitalRead(cTwentyFivePtPin);
//compare button state to previous button state
if (cTwentyFiveButtonState != cLastTwentyFiveButtonState)
{
//if the state has changed, add 1 to the counter
if (cTwentyFiveButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
chrisButtonPushTotal = chrisButtonPushTotal + 25;
Serial.println("C2 on");
Serial.print ("Chris's Point Total: ");
Serial.println(chrisButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal)+ String("+25"));
//digitalWrite(ledThree, HIGH);
//digitalWrite(ledFour, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
//digitalWrite(ledThree, LOW);
//digitalWrite(ledFour, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
cLastTwentyFiveButtonState = cTwentyFiveButtonState;
}
void checkCSeventyFive()
{
//read the 1 point button input pin
cSeventyFiveButtonState = digitalRead(cSeventyFivePtPin);
//compare button state to previous button state
if (cSeventyFiveButtonState != cLastSeventyFiveButtonState)
{
//if the state has changed, add 1 to the counter
if (cSeventyFiveButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
chrisButtonPushTotal = chrisButtonPushTotal + 75;
Serial.println("C3 on");
Serial.print ("Chris's Point Total: ");
Serial.println(chrisButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal)+ String("+75"));
//digitalWrite(ledThree, HIGH);
//digitalWrite(ledFour, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
digitalWrite(ledThree, LOW);
digitalWrite(ledFour, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
cLastSeventyFiveButtonState = cSeventyFiveButtonState;
}
}
void checkCHundredFifty()
{
//read the 150 point button input pin
cHundredFiftyButtonState = digitalRead(cHundredFiftyPtPin);
//compare button state to previous button state
if (cHundredFiftyButtonState != cLastHundredFiftyButtonState)
{
//if the state has changed, add 1 to the counter
if (cHundredFiftyButtonState == LOW) //PullUP resistor means PRESSED is LOW
{
chrisButtonPushTotal = chrisButtonPushTotal + 150;
Serial.println("C4 on");
Serial.print ("Chris's Point Total: ");
Serial.println(chrisButtonPushTotal);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal)+ String("+150"));
//digitalWrite(ledThree, HIGH);
//digitalWrite(ledFour, HIGH);
delay(1000);
}
else
{
// if the current state is LOW then the button went from on to off:
Serial.println("off");
//digitalWrite(ledThree, LOW);
//(ledFour, LOW);
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
}
//save current state as the last state for next time through loop
cLastHundredFiftyButtonState = cHundredFiftyButtonState;
}
void printLenoraReward()
{
if (lenoraButtonPushTotal /750 > lLastPrintedVal /750) //once points are greater than 1000, print reward
{
int arraySize = sizeof(reward) / sizeof(reward[0]);
int randomIndex = random(arraySize);
//printer.setTimes(5000, 525);
printer.wake();
printer.setFont('B');
printer.setSize('L');
printer.justify('C');
printer.feed(2);
printer.println((reward[randomIndex]));
printer.feed(4);
printer.sleep(); // Tell printer to sleep
lLastPrintedVal = (lenoraButtonPushTotal/750) * 750; //instructs arduino to wait until the next multiple of 1000 to print
}
}
void printChrisReward()
{
if (chrisButtonPushTotal /750 > cLastPrintedVal /750) //once points are greater than 500, print reward
{
int arraySize = sizeof(reward) / sizeof(reward[0]);
int randomIndex = random(arraySize);
//printer.setTimes(5000, 525);
printer.wake();
printer.setFont('B');
printer.justify('C');
printer.setSize('L');
printer.feed(2);
printer.println((reward[randomIndex]));
printer.feed(4);
printer.sleep(); // Tell printer to sleep
cLastPrintedVal = (chrisButtonPushTotal/750) * 750; //instructs arduino to wait until the next multiple of 1000 to print
}
}
// void printLenora1750Reward()
// {
// if (lenoraButtonPushTotal /1750 > lLastPrintedVal /1750) //once points are greater than 1500, print reward
// {
// printer.setTimes(5000, 525);
// printer.wake();
// printer.setFont('B');
// printer.setSize('L');
// //printer.doubleHeightOn();
// printer.justify('C');
// printer.feed(2);
// printer.println(F("Lenora Test Reward!"));
// printer.feed(2);
// printer.sleep(); // Tell printer to sleep
// lLastPrintedVal = (lenoraButtonPushTotal/1750) * 1750; //instructs arduino to wait until the next multiple of 1750 to print
// }
// }
// void printChris1750Reward()
// {
// if (chrisButtonPushTotal /1750 > cLastPrintedVal /1750) //once points are greater than 1000, print reward
// {
// printer.setTimes(5000, 525);
// printer.wake();
// printer.setFont('B');
// printer.setSize('L');
// printer.justify('C');
// printer.feed(2);
// printer.println(F("Chris Test Reward!"));
// printer.feed(2);
// printer.sleep(); // Tell printer to sleep
// cLastPrintedVal = (chrisButtonPushTotal/1750) * 1750; //instructs arduino to wait until the next multiple of 1000 to print
// }
// }
void checkResetButton()
{
resetButtonState = digitalRead(resetButton);
if (resetButtonState != lastResetButtonState)
{
lenoraButtonPushTotal = 0;
chrisButtonPushTotal = 0;
cLastPrintedVal = 0;
lLastPrintedVal = 0;
screen.clear();
screen.setCursor(0,0);
screen.print(String("P1: ")+ String(lenoraButtonPushTotal));
screen.setCursor(0,1);
screen.print(String("P2: ")+ String(chrisButtonPushTotal));
}
lastResetButtonState = resetButtonState;
}