Menu

Why you don't use GPIO port on Raspberry ?

Anonymous
2020-06-30
2021-02-17
  • Anonymous

    Anonymous - 2020-06-30

    Hi everybody !
    Being on a project to create a dart target with a Raspberry, I wonder why you do not detect the GPIO port?
    I am a pure .Net developer and I am not very comfortable with Python; on the other hand, I managed to make a Python program to scan the GPIO port and recover the pins in action to make, subsequently, a mapping with the target values (this is a matrix, no more no less).
    The only thing is, I don't know where I can put this program (understanding Python is time consuming on my personal schedule and I don't have a lot of time), can you help me?
    Thanks everyone!

    Et en français pour les non anglophone

    Salut tous le monde,
    Etant sur un projet de création d'une cible de fléchette avec un Raspberry, je me demande pourquoi vous ne détectez pas le port GPIO ?
    Je suis un pur développeur .Net et je n'ai pas beaucoup d'aisance avec le Python; par contre, j'ai réussi à faire un programme Python pour scruter le port GPIO et récupérer les pins en action pour faire, par la suite, un mappage avec les valeurs de la cible (il s'agit d'une matrice, ni plus ni moins).
    La seule chose, c'est que je ne sais pas où je peux mettre ce programme (comprendre le Python est chronophage sur mon emploi du temps perso et je n'ai pas énormément de temps), pouvez-vous m'aider ?
    Merci à tous !

     
  • Reredede

    Reredede - 2020-06-30

    I forgot to log in before ...

    J'ai oublié de me connecter avant...

     
    • poilou

      poilou - 2020-07-01

      Hi and Welcome Remi !

      Just a question : What's the benefit of using directly the Rasp instead
      of the regular Arduino ?

      Cheers

       
      • Reredede

        Reredede - 2020-07-01

        Hi and thank's for the Welcome !

        The benefits of using Raspberry directly are many. First, budget, only one multi-use card to buy. Then we have the OS directly on the machine, we can manage Wifi, Bluetooth, put music software, put a webcam, etc. A mini PC in itself.
        Regarding the use of GPIO, this allows not to weld on the original card of the target and therefore if we want to resell the target or change it is perfect. Plug and play. We take the "tablecloths" ("nappe" in French), we plug them into adaptive cards and we connect to the GPIO. You can also connect buttons to have other utilities (next player, navigate the menu, etc.). It would seem that the current target manufacturers have agreed on the layers for their targets. I dismantled five targets and I always got the same result (a tablecloth of 10 and a tablecloth of 7); it would seem that the old targets are different, but it is only a question of adapting the intermediate cards (or to pass by the operation via Arduino).
        This is why I am interested in adding my support detection program via the GPIOs of the Raspberry in pyDart; I already did it in Python and it works. But being a full .Net developer, Python is a little bit complicated and I can't see where I can add my program (already in the configuration / detection menu).
        I made a tutorial explaining my approach if you are interested, but it is in French.

        Best regards

         

        Last edit: Reredede 2020-07-01
        • poilou

          poilou - 2020-07-01

          Hi Rémi,

          That's pretty interesting despite the fact that, using the Raspberry,
          you're logically tied to the computer runing pyDarts and no way to
          switch to another.

          Let's just remember the original idea of pyDarts : we would have a
          mobile target that can be plugged indoor, outdoor, on a laptop, or a
          desktop, with an internal battery or not. That's the reason why we chose
          the Arduino first.

          But I understand easily that, for a full and bare metal target, that
          stay in the garage, we can avoir using the Arduino.

          I am totally interessted by your documentation in french (I am), so I'll
          have a look and estimate the dev time for this. This could be included
          in the next dev branch. The current branch is freezed for new features.

          Cheers

           
          • Reredede

            Reredede - 2020-07-01

            Hi poilou,

            You're nots tied to the computer, because the Raspberry is the computer !
            You also have a moving target, pluggable inside and out. The only constraint is a power supply. You can view the application either on a fixed terminal (with a screen, mouse, touch screen, etc.), or via a VNC on a tablet, a smartphone.
            The Arduino requires a computer, the Raspberry not (since it is the computer).
            I have already recovered the sources and I have executed them on the Raspberry; the hardest part for me is understanding Python.
            For development, I can continue to improve the application that you will see in the doc, like that, it will suffice to manage the returns expected by pyDarts (and therefore wire to the existing one;)).
            Regards

            [EDIT]

            I just re-read your answer and more particularly this sentence: "That's pretty interesting despite the fact that, using the Raspberry, you're logically tied to the computer runing pyDarts and no way to switch to another. "
            Indeed, we cannot "disconnect the link", but the purpose of pyDarts is to make it a connected target ? So in my eyes, there are no "real" reasons for wanting to disconnect the target for the reconnect to another computer. Above all, you have to be able to move it without having a computer constraint (see even 0 constraint if you create a game stand).
            I find it rather illogical to want to change computers, vdarts offers a fixed target (with a price more than "premium"), only the display moves (via smartphone, tablet)

             

            Last edit: Reredede 2020-07-01
            • poilou

              poilou - 2020-07-01

              Hi Remi,

              I perfectly know the difference between Rasp and Arduino, I use both of
              them for many projects ;)

              The choice has been made initially for Arduino. Let say you're a mac
              user, and you want to run pyDarts, you just have to plug the usb cable,
              run pyDarts, and that's it. Same if you're running any operating system.

              But anyway, the project is interessting ! Reading GPIO inputs is and
              easy part.

              My roadmap contains the following :

              • fix all bugs in v1.2.0 and release
              • start dev of v1.3.0

              Dev of Rasp input could be done for 1.3.0.

              Cheers !

              On 01/07/2020 11:05, Reredede wrote:

              Hi poilou,

              You're nots tied to the computer, because the Raspberry is the computer !
              You also have a moving target, pluggable inside and out. The only constraint is a power supply. You can view the application either on a fixed terminal (with a screen, mouse, touch screen, etc.), or via a VNC on a tablet, a smartphone.
              The Arduino requires a computer, the Raspberry not (since it is the computer).
              I have already recovered the sources and I have executed them on the Raspberry; the hardest part for me is understanding Python.
              For development, I can continue to improve the application that you will see in the doc, like that, it will suffice to manage the returns expected by pyDarts (and therefore wire to the existing one;)).
              Regards


              Why you don't use GPIO port on Raspberry ?


              Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/pydarts/discussion/general/

              To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

               
              • Reredede

                Reredede - 2020-07-01

                Hi poilou !

                I think I will start implementing it; I'm too impatient to wait for v1.3 ( XD ).
                Or I would see to make a version only for the Raspberry, because the final idea is clearly to get what VDart does, as in the photo attached (if I get there, I would provide the sources so that you can have a v2 or a Raspberry pyDart). It must be said that there are quite a few members of our Facebook group who are interested in this.
                In the worst case, I would make a Xamarin application that would communicate either via Bluetooth or via Wifi (and therefore easily displayable on tablet or smartphone) or else I would see interfacing with the VDarts application (and others).
                Maybe I should make it a branch? Currently I only have a snapshot of the source.

                Best regards

                 
                • Diego2

                  Diego2 - 2020-07-04

                  Despite of being 2 years without playing pydarts (and showing here), i am reading all the things that my "old" friend poilou and Diego "The first did" and i have to say that both of you are awesome improving pydarts as you did in the last two years!.

                  I am really interested in the idea of "adapting" pydarts to work with an raspberry. So please Reredede, i will appreciatte having news or having the possibility of joining this facebook group that you are talking about.

                  But, i remember that @Andreas achieved the goal of running pydarts on a raspberry ( pi zero)... maybe he could help in something about this if he is still around...

                  Good to know from all of you.

                  cheers, Diego2

                   

                  Last edit: Diego2 2020-07-04
                  • Reredede

                    Reredede - 2020-07-07

                    Hi Diego2,
                    Concerning the development of the adaptation of pyDarts on the Raspberry, I made test scripts according to the different layers (7 * 10, 8 * 8, ...), I created a new class for reading information from GPIO, I have connected to the general operation and I am at the stage of correcting the recovery beugs from the 'SectionKeys' list.
                    The configuration went well (I get the list of keys corresponding to the values), but when I launch a game, at the first impact, the game restarts.
                    Being a .Net developer, and only looking at Python from afar, it takes me a little more time than for .Net applications.
                    I also made user documentation (in French), or rather tutorial, for the members of our Facebook group.
                    Indeed, if Andreas sees this topic, he could perhaps help me.
                    Best regards

                     
  • Reredede

    Reredede - 2020-07-04

    Hi poilou,
    I have a problem with the pyDarts code. I have made the correspondence between the target zones and characters, but in game, each time I touch a target zone, pyDarts informs me that the character does not exist in the list of keys. .
    Yet it is on the list... Do you need a few more things on this list?
    Thanks to you
    Best regards

     

    Last edit: Reredede 2020-07-07
  • Reredede

    Reredede - 2020-07-07

    Hi everybody,
    I finished the code allowing pyDarts to work with the GPIO port of the Raspberry. There are a few things left to make it all look pretty, but it works.
    I don't know if I should provide you with the code and my little tutorial just in case.
    Best regards

     
    • poilou

      poilou - 2021-02-17

      Hi Rererere,

      How does you project goes ?

      Would you possibly share your changes and your Raspberry configuration
      to the community ?

      poilou

       
      • Reredede

        Reredede - 2021-02-17

        Hi poilou,

        It's been a long time since I came to the forum.

        Regarding the project, I took the liberty of renaming it 'RaspyDarts'. He is moving very well. I have around me a small community of madmen who ask me things and others.

        I made a lot of changes in the code. I want to share it with you, but how do we do it?

        I'd love to see you on our Facebook: https://www.facebook.com/groups/1124845401274184

        Some of us produce a RaspBerry communication card to the Decathlon target.
        Some also rehabilitate old darts.
        I implemented an animation management of strip led according to the result, the lighting of the segments of the target and I see to make a DMD (led matrix screen) which would display animations according to the game. I implement in right now a computer player because some of us find the online game empty.

        But I'm not developing quickly because a lot of personal projects.

         

        Last edit: Reredede 2021-02-17
  • Cory Baumgart

    Cory Baumgart - 2020-07-09

    i'd be interested in seeing your tutorial and code. I can google translate if need be :)

     
    • Reredede

      Reredede - 2020-07-16

      Hi Cory,

      Sorry for the late reply, I just got back from vacation.
      I provide you with the PDF that I made for our Facebook group of Pincab.
      You will find everything you need in it (dl.free download links and step-by-step tutorial), don't hesitate to come back to me if you have any questions; everything is in French and translators can sometimes make mistakes.
      I have not yet recovered from the code part of pyDarts, my garden is a real forest and I must take care of it. But I would finalize the code so that it is clean and usable easily.

      Bests regards and have fun !

       
  • Reredede

    Reredede - 2020-07-20

    Hi everybody,

    If you are looking for updated information, you can follow this link: https://montetoncab.fr/tctedg-ou-the-cheapest-target-electronic-dart-game-ou-raspydarts/

    Best regards and have fun !

     

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.