GithubHelp home page GithubHelp logo

flotwig / pi-dartboard Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 16.78 MB

A real-life dartboard that keeps track of score via Raspberry Pi. Supports various game modes.

Shell 0.22% C 98.36% CSS 1.42%

pi-dartboard's Introduction

Pi Dartboard

Our Dartboard

Team members: Kaitlin Burke, Kevin Hillinski, Sangwon Han, and Zach Bloomquist

Demo video

Table of Contents

  1. Project Idea
  2. Instructions
  3. Hardware Setup

Project Idea

This project is an electronic dartboard that uses the plastic casing of an existing electronic dartboard and adds a Raspberry Pi and a touchscreen.

The touchscreen will be mounted in the casing and the Pi and wiring will be hidden inside in the case as well.

To register when darts hit the dartboard, we will use GPIO pins as digital input and digital outputs, along with an algorithm, to detect when a dart has hit.

This setup will allow us to program any popular dart game as well as any custom game that be thought of.

We will also make a GUI for gameplay with buttons such as "Missed Dart" and "Next Player", as well as a home screen that allows you to pick the game mode and number of players.

Instructions

  1. Connect the Raspberry Pi and dartboard together as described in Hardware Setup.
  2. Boot up your Raspberry Pi and open a terminal
  3. Clone this Git repository to your Raspberry Pi to get set up with the code for this project:
    git clone https://github.com/flotwig/Pi-Dartboard.git
  4. Run ./guitest to start the dartboard user interface.

If you modify the code, you can use ./build.sh to rebuild the guitest executable.

Hardware Setup

Display & LED Hookup

Connect the Pi to the HDMI display's HDMI and USB (for touch input).

Connect the LED signal pins to GPIO 2, 3, and 4 through 330ohm resistors and connect the last pin to ground.

Dartboard Hookup

Here's what the dartboard looks like from the back with the circuit removed and with the circuit board added:

Without Circuit Board With Circuit Board
Dartboard back Dartboard circuit

When a dart hits the dartboard from the front, the little plastic piece it hits will slide backwards:
Plastic bit sliding

And it will strike the dartboard's circuit board:
Plastic bit striking

The circuit board itself consists of three layers. The top and bottom layers are flexible layers with large solder pads at the intersection of traces. The middle layer is a solid translucent plastic sheet with holes where the top and bottom layers have intersections. Thus, when a dartboard strikes the dartboard, the traces of the top and bottom layers will connect through the middle layer for a moment at the location where the dart struck.

By carefully decoding what traces of the cables coming from the circuit board cover what parts of the dartboard, we can connect the dartboard to our Pi and use code to poll for hits.

Our dartboard uses a thin ribbon cable for connection. To adapt this to our breadboard, we opted to cut up the ribbon cable between the traces and attach alligator clips to each contact, since soldering the ribbon cable would destroy it:
Ribbon cable splice

In our setup, we used the following table to align the traces on the circuit board to our circuit layout:
Circuit layout

Then we can calculate the point values for each possible combination of pins:
Point values

We connected the pins from the dartboard circuit to the corresponding GPIO pins on our Raspberry Pi:

Pinout Table Raspberry Pi 3 Pinout
Pi Pinout Raspberry Pi 3 Pinout

Speaker Hookup

We'll re-use the existing speaker that's in the dartboard. You'll need to solder on new wires to the speaker's + and - hookups. Then, connect the audio amplifier and TRRS breakout board as follows:

Amplifier Pin Connection
OUT + Speaker +
OUT - Speaker -
IN + TRRS RING1 and TRRS TIP
IN - Pi Ground
PWR - Pi Ground
PWR + Pi 5V
TRRS Breakout Pin Connection
SLEEVE Ground
RING2 Not Connected
RING1 Amp IN +
TIP Amp IN +

We connect the TRRS RING1 and TIP because together, they contain the left and right channels.

Now, connect the Pi's 3.5mm output to the TRRS breakout board's 3.5mm jack.

As a last step, ensure that the Pi's audio is set up to be routed over 3.5mm, not over HDMI. This varies by operating system and previous config so we will not cover it here.

pi-dartboard's People

Contributors

flotwig avatar

Stargazers

JCluzet avatar Britton Hayes avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.