ARROW GAME CONSOLLE

 

Here it is Christmas toys for lovers of darts….

It all started with a bet with my son: Dad instead of always watches, why do not you make me a totalizer points for darts ????. (so let me save you some pennies for not buying one already made !!).

I'm fine……try but I do not guarantee……

I started then to study and wandering around the Internet I got some information: the rules are clear enough: I downloaded the pdf of F.I.G.F. (Italian Federation Game Darts) 15Edition of 1.11.2013, and it describes how to behave in the game, what the limits are the scores, etc.: 20 pages in all.

Most of the information in this “vade mecum” They not interest me particularly, I needed to understand the points award mechanism. So to simplify an image from Wikipedia:

Virtually: the player throws a consecutive series of three darts, and for each launch subtracts from a base score the total of acquired points. The base score starts at 301, 501 O 701 to decrease until reaching zero (or busting !).

The solution adopted (always changeable course) It is deliberately simple and at the same time (in my opinion) simple to use.

L’ HARDWARE AND SOFTWARE:

It states that the HW devices are recycled objects or cannibalized by other disused objects for which the cost for the realization of what you saw in the initial picture is limited only to the keyboard 4×4 membrane. The most challenging part was the construction of the box since they are a landslide in DIY for which the dimensions of the various parts never coincide !!.

What you need then to do “toy” simple but functional ?.

  • A sufficiently large display to contain all the necessary informations and in this case a LCD/I2C 20×4.
  • A keyboard to enter the values ​​of the scores (4×4).
  • A series of buttons for some additional functionality.
  • A microcontroller for the management program (Arduino NANO)
  • A power supply (5V) to give life to everything. (a charger is more than enough with a USB cable to be inserted into the connector ArduinoNANO)

You could do something different ?….well some: The display could be replaced with two groups of 3 display a 7 segments: (three for each player limited to two players) but getting complicated connections to the micro. The keyboard can hardly be replaced because the values (see bersagli0) I'm 20 and a keyboard 4×4 excellently solves the problem.

Here's what the game's target: each segment corresponds to a value that can be the subject of multiplies depending ring in which is located the dart launched.

For my professional bias I always thought that any type of application “informatica” It should be easy to use for the user and at the same time should enable him to avoid mistakes and to follow in data (so that then do not say “the computer was wrong !“).

So this “toy” It is not just a product with a little harware around but also a software project with some personal characteristic. With this, from me to compete with similar products and more performance: that achieved is a “contraption” home !.

Let's see then (before describing the HW) with a series of images as the software it has been developed: here is the first image just lit:

First you enter the name (?) the first player: via the keyboard by pressing a numeric key the character on which the cursor is blinking changes from “A” a “FROM” in recursively: pressing “*” It moves to the next character until the fourth laying down the end.

After this insertion, the display presents the same image to enter the name (?) the second player with the same system seen with the first.

The management software also provides the ability to store (EEPROM del micro) a state of the game in order to then resume at a later time. This is possible with a specific button on the keypad. For this reason, the display might include the following image:

So if you press “*” the system will read from the EEPROM the names of two players and scores on at the time of storage. Pressing “#” system will restart from scratch and will be prompted for the name of the two players as seen above. But the stored values ​​are not deleted.

then added the names (or recovered from the EEPROM) The display requires the game mode with the following screen:

It must be chosen the target of the score between the values (standard according to the rules) 301,501,701. Then begins the real game.

Here is the real game screen and right: the target has been chosen to 301 points and you start with the first player. However throwing darts, recovered the points obtained these can be inserted with the following criteria:

For the first launch (cursor blinking) inserting the value through the keyboard typing also the eventual “zero” (for lower values 10), then you will also enter an asterisk and then the value of the multiplier typed score. This is because depending on the type, the score can be multiplied. Immediately this value is “subtracted” to the target chosen and the cursor will move in the second field (or in the third) for insertion of the next value. If you accidentally enter an incorrect value (or mistyped) you can always delete what you type by pressing the button “CANC” hand control. Button that can be pressed only if they have been inserted 4 characters required because typing is controlled and driven by software.

Submitted the third value (possibly also shabbily) You must necessarily go to the next screen to the second player by pressing the button “PLR” hand control. The process is repeated and after having inserted the last value relative to the second player by pressing the button “PLR” it starts with the first player. The screen is identical to the previous with the difference of the name (Player2) and its final target.

CAUTION: it is up to the player “NOT UNPACK” in the sense that the system NON contemplates the possibility that the value entered is greater than the target value which is decremented at each launch of darts. (my laziness: you could control from program).

THE PUSH-BUTTON:

For additional features you could use 4 keys “A,B,C,D” the membrane keyboard but I preferred to enter 4 buttons as photos:

I'm 4 switches which close to ground when pressed and have the following meaning:

  • The button “CANC“: It is used to erase a possible value of the wrong score. It is not used for any other function and is viewed by the program only in one phase determinta.
  • The button “PLR“: It serves to switch a player to’ another and is only seen when the third score was also inserted although = zero.
  • The button “SAVE“: EEPROM is used to store the values ​​of the two players to be able to resume the game at a later time.
  • The button “RESALL“: to be used only and only if you want the total of the scores zero: in practice the system and resets the values ​​stored in the EEPROM. (It is not a hardware reset but only SW).

The screens that are displayed when pressing the keys are as follows:

E’ We were asked to save data: the system crashes and to allocate necessary to press the button “RESET HW” (button laterally inserted into the box) or disconnect the power supply and then reinsert.

E’ sato pressed the button “RESALL“: the system deletes the EEPROM and crashes. Again to start again, press the button “RESET HW” or disconnect the power supply and then reinsert.

DELL'HARWARE TOGETHER:

Not much to say: the microprocessor used is l’ATMEGA328 wired on board ARDUINO NANO. Given the small size it is preferable compared to ARDUINO UNO. As the eldest brother “on board” all digital and analog pin with two extra pins. Power can be provided by a simple charger 5The 1 / a to be connected to the USB input managed by a converter RS232 CH340G and which allows fast upload of the sketch.

The keyboard is used to type membrane 4×4 ie all the numeric keys with keys “*” e “#” e 4 The keys,B,C,D. It connects through 8 pin (4 by line and 4 by column) to pin D2 / D9 of the board. A library dedicated scans the keys and releases the ASCII code of the key pressed. It is blocking so we need a loop to check the button pressed or not pressed.

The display is a LCD 20×4 with I2C interface: is the best solution because with only two wires (SCL/SDA) it runs smoothly. The setting is great because the digital pins are almost all occupied: 8 from the keyboard and 4 the panel that it was necessary to use the pin “A0” seen as a digital. It was not possible to use pin 13 that, as found on the Arduino forum has its own specific problems on board “ArduinoNano”. But it takes a different approach in practice: instead of closing the switch to make the mass’ reverse: pull_down and closure +5.

Finally, the panel: I'm 4 simple switch connected to pins D10, D11, D12, A0 with pull-pup on pcb via a restenza 10k. Rounding out the contact with the ground when pressed.

CONCLUSION:

The solution chosen and the methods used in the development of the sketch (It occupies just over 10k) They have definitely improved from all points of view. Eg, you could do ua application much choreographic Visual_Basic, having a full-screen video and a more simplified management of data input and controlled. But this solution would involve the use of a computer with its monitor, keyboard, mouse, etc, while the solution adopted allows a transportability of’ “contraption” everywhere and dependent only from a feeder.

At least, My son is satisfied……….(!)

 

MERRY CHRISTMAS AND HAPPY NEW YEAR TO ALL !

gvsoft December 2017

VOTE
5 replies
  1. Marcello
    Marcello says:

    Good idea, congratulations to your son.
    Following the World Championships that are taking place these days, This article arrives on time.
    The only thing missing is the circuit diagram for those who would like to replicate it.
    Marcello Greetings

    Approvals
    • gvsoft
      gvsoft says:

      Thanks Marcello, but as far as the circuit there is an electrical diagram in that the connections are standard toward the micro used: Arduino NANO to which must be connected LCD (SDA/SCL) the keyboard (8 pin da D2 a D9) and control box (D10,D11,D12,A0). And the connections are made via individual wires.
      The power is supplied by a charger connected to the USB dell'ARDUINO NANO. The only necessary circuit would be that of the panel, but everyone is free to do as he wishes. The sketch describes the connections that can be changed to taste.
      hello and happy new year

      Approvals
    • gvsoft
      gvsoft says:

      Thanks Amilcare, levamisole but a curiosity: how do you put a picture at the beginning, ?. Between the’ Another you may not make it smaller ??
      Hi happy new year

      Approvals
      • Amilcare
        Amilcare says:

        If you go to change articles in the bottom right you can find the “image highlights”.
        Since you did not have any set I put one of your, if you want to replace the image with one that you like you can simply do it by choosing the one that best suits you

        Approvals

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply