Hello, this is my first instructable. I am using an Arduino to keep track of cricket scores with an LCD screen and an infrared remote. The scorer shows your runs, overs, time spent batting and calculates and shows your run rate. I have also made a wooden box/case for it which protects it. I know this project is rather limited and is far from perfect but I was limited by the amount of space on the LCD screen and my limited coding knowledge. I have made the code so it easy enough to modify maybe for a different game or something else like maybe including wickets instead of time spent (I didn't worry about wickets due to the fact that I usually only play with 1 other person.). If anyone sees any errors in code or has any suggestions whatsoever just leave them in the comment section. There are two problems at the moment the run rate only updates every over so it is wrong between overs(i'm not sure why it shows up with -1 at the start), and if you hold the remote down for slightly too long it sends more than one value which updates the score too much. I am attempting to fix this. Thanks
Step 1: Componentry
Most of the components I use should be included in a basic Arduino kit. But are generally fairly cheap anyway.
• Arduino(any, I use a mega but uno or other would be fine)
• Solderless Breadboard
• Header pins(if your LCD does not already have pins on it)
• A 220 OHM resistor
• 16x2 LCD screen
• 50k Potentiometer
• Infrared remote receiver
• Plenty of jumpers
• Any infrared remote with numbers 0-6 plus a button that can be used to reset.
• Mobile Phone Power Pack (optional)
• Arduino Usb Cable
Step 2: Wiring
The wiring is fairly simple, it is the usual lcd display wiring plus a infrared receiver on pin 8 and a jumper going from pin 9 to reset. I have added a fritzing diagram and a photo. If your LCD has no pins already attached you must insert the header pins through the LCD holes to attach it to the breadboard. You may have to play around aand push them down fully to make the lcd display. I actually had to change the wiring around because I accidentally put the hole for the LCD on the wrong side, I have include a photo of the latest wiring.
Step 3: Programming
Before you get the code please download the IR remote library, here is a link:
I tried to paste the code here but it didn't turn out so please use this link on Github to get the code:
Please do not use this code for non-private uses without my approval.
After you have pasted the code, it will not work, you will have to substitute your own infrared remote codes over mine. To do this open Arduino, Examples, IRremote, IRrecvDemo. If you have the wiring done from the previous step please replace:
int RECV_PIN = 11;
int RECV_PIN = 8;
Then upload, open the serial monitor and use the values given from your remote to replace my values in my code. As someone pointed out to me if your remote values have 8 numbers/letters like this: 6F6EBBF3 then you must add an 0x in front of it so it looks like this. 0x6F6EBBF3. If you end up with errors just comment because I certainly got plenty but it should be fine now.
Step 4: Wooden Box
To protect the Arduino and components I created a wooden box. This box consists of just scraps of wood around the house. There is a big hole for the LCD screen and the infrared receiver, which I will eventually cover with plastic. I am not going to include any instructions on how I made it because it is simple enough and my one wasn't really that good as I made it in a bit of a rush and it was just out of scrap wood. I have added plenty of photos if anyone does want to make one similiar. If I had a hinge or two I would have raised it up at the front with a stand that folds out, but the main point of the box is protection and practicality so I wasn't too worried about it.
Step 5: Conclusion
In the components list you may have seen a power pack as optional, this is handy as you do not want to be lugging a computer around backyard cricket games. I do not take any responsibility for any damage done to the power pack or the Arduino if you do decide to use it but my power pack plugs in to the Arduino usb cable and works fine. I also do not take responsibility if you decide to use this playing a cricket match and something happens to your Arduino or any of the components. I strongly recommend making a case or at least making sure it is protected. If anyone has any ideas, finds any mistakes or has something to say, please be sure to comment it so me and others know. Also please let me know if you made it. I would love to know if this instructable is followable and this project works for you.