Menu

Löwen Dart (Royal Dart) Matrixanschluss am Arduino

Anonymous
2018-02-12
2018-04-21
  • Anonymous

    Anonymous - 2018-02-12

    Hallo, ich will bei meinem Löwen Dart (Royal Dart) pydart spielen =) Habe jetzt alles gekauft was ich brauche..... Wie ist der Anschluss ans Board von Arduino ???? Wie muss ich die Matrix verbinden??? Vielleicht hat jemand sogar Bilder.... Vielen Dank

     
  • Anonymous

    Anonymous - 2018-02-13

    Hello, I want to play with my lion darts (Royal Dart) pydart =) Have now bought everything I need ..... How is the connection to the board of Arduino ???? How should I connect the matrix ??? Maybe someone even has pictures .... Thank you

     
  • Anonymous

    Anonymous - 2018-02-13

    Hi !
    Did you check the wiki ?
    I recommand English since German language is not terminated yet.

    You are welcome to improve it if something is wrong :)

    Cheers !
    Poilou

     
  • Anonymous

    Anonymous - 2018-02-14

    Hello unfortunately I find nothing in the wiki. Have a 4x16 matrix and unfortunately do not know how to connect to the Arduino.

    Cheers

    Sebastian

     
  • Anonymous

    Anonymous - 2018-02-14

    and that is the occupancy of my matrix but how is it connected to the arduino? How do I have to rewrite the program that arduino recognizes it correctly? sorry that's all a little new to me!

     
  • Andreas

    Andreas - 2018-02-16

    Here in German:
    https://www.reichelt.de/reicheltpedia/index.php5/Arduino#Projekt_Dartscheibe

    Du muss aber schon ein wenig selber deinen Kopf anstrengen :) Viel Glück

     
  • Anonymous

    Anonymous - 2018-03-18

    The wiki is not always available, when running has essential info.

    I installed and connected my 4x16 for the first time last week. I connected the 4 pins to arduino A0-A3. The 16 remaining pins are connected to A4-A6 and 1-14. There are example arduino files in the download. The example file will need to be modified to use the appropriate pins as input and output, will post my arduino file in a bit.

    Unfortunatly I ran into an issue completing the initial calibration of pydarts. I ha e not had time to bebug but i suspect it is because of the uniqness of pin 13.:

    https://www.arduino.cc/en/Tutorial/DigitalPins

    NOTE: Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, set its pinMode() to INPUT and use an external pull down resistor.

     
  • Mike

    Mike - 2018-03-19

    Found a typo in my statement above, should read A4-A5 and 0-13.

    Also to not the special note for pin 13 has not been an issues. However I am having trouble with pin 0 &1.

     
  • Anonymous

    Anonymous - 2018-03-19

    Found a new issue with interfacing 4x16 matrix to an Arduino UNO. Digital output pins 0 & 1 can not be uses when the Serial/USB interface are being used, yes it is used to communicate with the PS or Pi... Currently researching other options to allow multiplexing pins.

     
  • Anonymous

    Anonymous - 2018-03-19

    Hi Mike !
    Sorry the wiki is currently not available because it is self hosted and I work in my house at the moment. It will be back in the next few days.
    Good luck !

     
  • poilou

    poilou - 2018-03-19

    Wiki is up !

     
  • Mike

    Mike - 2018-03-19

    No worries!!!

     
  • Mike

    Mike - 2018-03-20

    Posting my working Arduion code, modified version of the sample 4x16 matrix utilizing an Arduino MEGA 2560 rev3. With the 4/16 matrix 20 pins are needed & the Arduino Uno limits you to 18 pins for I/O. Thre are MUX shields that could be added to expand pins or potentially Charlieplexing, https://en.wikipedia.org/wiki/Charlieplexing. Howver the Microcenter has the Inland arduino 2560 for $10 so it was not worth the effort.

    This config does not include the extra buttons for game control, that is future. Hope it is useful for someone.:


    / @file CustomKeypad.pde
    || @version 1.0
    ||
    || @description
    || | Demonstrates changing the keypad size and key values.
    || #
    /
    /#include <Keypad.h>
    /
    /
    Note : This file should be adapted to your the wires that you havec connected to your arduino controler !
    /
    const byte numRows = 4; //four rows
    const byte numCols = 16; //four columns
    const int debounceTime = 20;//20 works better than great !
    //define the symbols on the buttons of the keypads
    char keymap[numRows][numCols] = {
    {'0','1','2','3','4','5','6','7','8','9','','B','C','D','E','F'},
    {'a','b','c','d','e','f','g','h','i','?','K','L','M','N','O','P'},
    {'j','k','l','m','n','o','p','q','r','&','T','U','V','W','X','Y'},
    {'s','t','u','v','w','x','y','z','A','@','+','-',']','/','!','$'}
    };
    byte rowPins[numRows] = {A0, A1, A2, A3}; //connect to the row pinouts of the keypad
    byte colPins[numCols] = {22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37}; //connect to the column pinouts of the keypad

    //initialize an instance of class NewKeypad
    /
    Keypad customKeypad = Keypad( makeKeymap(Keys), rowPins, colPins, ROWS, COLS);
    /
    void setup()
    {
    Serial.begin(9600);
    for (int row = 0; row < numRows; row++)
    {
    pinMode(rowPins[row],INPUT); // Set row pins as input
    digitalWrite(rowPins[row],HIGH); // turn on Pull-ups
    }
    for (int column = 0; column < numCols; column++)
    {
    pinMode(colPins[column],OUTPUT); // Set column pins as outputs
    // for writing
    digitalWrite(colPins[column],HIGH); // Make all columns inactive
    }
    }

    void loop()
    {
    char key = getKey();
    if( key != 0) { // if the character is not 0 then
    // it's a valid key press
    /
    Serial.print("Got key ");*/
    Serial.print(key);
    }
    }

    // returns with the key pressed, or 0 if no key is pressed
    char getKey()
    {
    char key = 0; // 0 indicates no key pressed

    for(int column = 0; column < numCols; column++)
    {
    digitalWrite(colPins[column],LOW); // Activate the current column.
    for(int row = 0; row < numRows; row++) // Scan all rows for
    // a key press.
    {
    if(digitalRead(rowPins[row]) == LOW) // Is a key pressed?
    {
    delay(debounceTime); // debounce
    while(digitalRead(rowPins[row]) == LOW)
    ; // wait for key to be released
    key = keymap[row][column]; // Remember which key
    // was pressed.
    }
    }
    digitalWrite(colPins[column],HIGH); // De-activate the current column.
    }
    return key; // returns the key pressed or 0 if none
    }

     
  • poilou

    poilou - 2018-03-21

    THanks Mike !
    I've added your code to the git repository :)
    Cheers

     
  • Mike

    Mike - 2018-03-24

    Your welcome. However, I can not claim the code as mine. This code was written by someone with more experiance than me. I modified it to fit my board. I'm stillworking it out but I beleive there is a way to get more i/o optioms from the arduino uno without adding hardware, will post a diagram and code once proven.

     
  • Anonymous

    Anonymous - 2018-03-27

    http://www.pighixxx.com/test/wp-content/uploads/2014/11/nano.png
    Es kommt darauf an wie man die Pins belegt, ich hab mit dem arduino nano alle 20 pins von der Matrix verbunden.

     
  • Mike

    Mike - 2018-03-30

    Agreed. WOuld you mind sharing your Arduino config?

    The nano has more usable ports. Couple that with a Raspberry PI Zero W for one small package. Will require a little work to add sound if the monitor does not have integrated speakers. One could add a USB sound card & speakers.

     
  • Anonymous

    Anonymous - 2018-04-18

    also der raspi zero ist definitiv zu langsam für einen flüssigen spielablauf, ich empfehle das aktuelle raspi 3 model. Die Arduino Configuration, kann ich erst nächste Woche posten, da ich gerade unterwegs bin.

     
  • Mike

    Mike - 2018-04-19

    i have not noticed any slowness with the mega i am using. however im looking at the possibility of using the raspberry pi io pins taking the arduino out of the picture.

     
  • Anonymous

    Anonymous - 2018-04-19

    OK ich dachte an den raspberry pi um das programm pydarts laufen zu lassen. Das problem beim raspberry pi ist, er benutzt ganze PIN Gruppen für andree Aufgaben, zum Beispiel Powermanagement.

     
  • Mike

    Mike - 2018-04-21

    I see your point in regards to using the pi for IO. Looking at the Nano as it is much smaller footprint that the Mega. I am interested in your connections to the Nano as analog pins 6 & 7may not be used as digital as well digital pins 1 & 2 are used for the USB.

    Edit: I miscounted pins!!! Off to order a couple.

     

    Last edit: Mike 2018-04-21

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.