Announce: Slimmer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tbali
    Member
    • Jan 2016
    • 73

    Announce: Slimmer

    Hello to All!

    The first public release of Slimmer is available. It's a software with which You can build a low cost user interface for your DIY Squeezebox player. Low cost means a cheap 2004 HD44780 compatible LCD (5$), two momentary switches, a rotary encoder (1$) and some resistors.

    More info: https://github.com/terba/slimmer/wiki
    piCorePlayer installation instructions: https://github.com/terba/slimmer/wiki/Building-a-player
    Source: https://github.com/terba/slimmer

    Please report bugs and wishes at the github issue tracker and ask questions here in the forum.

    I would really appreciate any feedback! Currently it was only tested on a RPi A+ with piCorePlayer, but there it works like a charm.

    Regards
    Balázs
  • DJanGo
    Senior Member
    • Sep 2005
    • 2856

    #2
    Hi,

    nicely done - i didnt took a deeper look at your work right now but it sounds good.
    is there a reason why the lsb header is missing here?

    cheers and welcome to the club

    Comment

    • tbali
      Member
      • Jan 2016
      • 73

      #3
      Hello,

      It is meant to be used on Tiny Core style distros. But can be easily extended for more sophisticated linuxes. I should mention that in the readme file.

      Thanks for the feedback!

      Regards,
      Balázs

      Comment

      • badboygolf16v
        Senior Member
        • Aug 2008
        • 167

        #4
        Looks great. Thanks for contributing. piCorePlayer goes from strength to strength.

        Something I will try out in the long winter evenings.

        Comment

        • kingswindsor
          Senior Member
          • Oct 2013
          • 118

          #5
          Slimmer PiCorePlayer and a rotary encoder

          I am just trying to get a rotary encoder to work using slimmer. I know the encoder works because it works in Moode but I am struggling to make it work with piCorePlayer. I am using the IQaudio DAC zero and the IQ audio encoder is connected to it.

          I have tried evtest and it reports nothing!

          The config files are as follows (192.168.1.76 is LMS not the player)

          slimmer.conf
          OPTIONS="--lmshost 192.168.1.76 --input /dev/pikeyd"

          pikeyd.conf
          ROT 23 24 KEY_LEFT KEY_RIGHT
          (everything else commented out)

          I've confirmed with Gordon at IQaudio that the DAC headers are to GPIO pins 23 and 24 on the DAC zero.

          Any advice, I'd be really grateful.
          Last edited by kingswindsor; 2016-07-06, 22:55.

          Comment

          • tbali
            Member
            • Jan 2016
            • 73

            #6
            Originally posted by kingswindsor
            I am just trying to get a rotary encoder to work using slimmer. I know the encoder works because it works in Moode but I am struggling to make it work with piCorePlayer. I am using the IQaudio DAC zero and the IQ audio encoder is connected to it.
            Does your encoder work on the same hardware setup with Moode?
            Are there pull-up resistors on the encoder's outputs?
            Or does Moode turn on the Pi's internal pull-ups?

            The following two options of PIKEYD are also interresting:
            -pu set internal pull-up resistors
            -pd set internal pull-down resistors

            These may turn on the Pi's internal resistors. But I never tested them, even Pikeyd was not written by me, so please make some research on that. The original source is available here: https://github.com/dozencrows/pikeyd/tree/rotary

            I think Pikeyd only handles incremental rotary encoders. What type of encoder do you have? I checked mine with a logic analyzer, and it produced the "wave" form seen here: https://en.wikipedia.org/wiki/Rotary...re_Diagram.svg

            I'm not an electronic expert btw.
            Last edited by tbali; 2016-07-07, 15:18.

            Comment

            • kingswindsor
              Senior Member
              • Oct 2013
              • 118

              #7
              Originally posted by tbali
              Does your encoder work on the same hardware setup with Moode?
              Are there pull-up resistors on the encoder's outputs?
              Or does Moode turn on the Pi's internal pull-ups?

              The following two options of PIKEYD are also interresting:
              -pu set internal pull-up resistors
              -pd set internal pull-down resistors

              These may turn on the Pi's internal resistors. But I never tested them, even Pikeyd was not written by me, so please make some research on that. The original source is available here: https://github.com/dozencrows/pikeyd/tree/rotary

              I think Pikeyd only handles incremental rotary encoders. What type of encoder do you have? I checked mine with a logic analyzer, and it produced the "wave" form seen here: https://en.wikipedia.org/wiki/Rotary...re_Diagram.svg

              I'm not an electronic expert btw.
              tbali

              I have done some more research and i believe Moode turns on the Pi's internal pull-ups (like Wiring Pi does).

              I'm using the rotary encoder from Gordon in IQaudio and there is a lot of information in his guidance and on his github links about the encoder. It's beyond my skill level though to apply it to PiCorePlayer!

              Am I correct in assuming you have external pull-up resistors in your hardware setup for the rotary encoder? If so, would you be able to share that as I might be able to make progress that way?

              many thanks

              Comment

              • paul-
                Senior Member
                • Jan 2013
                • 5728

                #8
                Originally posted by kingswindsor
                tbali

                I have done some more research and i believe Moode turns on the Pi's internal pull-ups (like Wiring Pi does).

                I'm using the rotary encoder from Gordon in IQaudio and there is a lot of information in his guidance and on his github links about the encoder. It's beyond my skill level though to apply it to PiCorePlayer!

                Am I correct in assuming you have external pull-up resistors in your hardware setup for the rotary encoder? If so, would you be able to share that as I might be able to make progress that way?

                many thanks
                I am using Gordon's IQ_rot and it works just fine (At least with the Amp+ board), but you need libwiringPi. PiCorePlayer does not come with wiringPI built in, and there could be a library version conflict as well. I have it compiled and statically linked with wiringPi, I'll send you a link when I get home this evening. That will be a good test to make sure your hardware is wired properly for use with piCorePlayer.
                piCorePlayer a small player for the Raspberry Pi in RAM.
                Homepage: https://www.picoreplayer.org

                Please donate if you like the piCorePlayer

                Comment

                • kingswindsor
                  Senior Member
                  • Oct 2013
                  • 118

                  #9
                  Originally posted by paul-
                  I am using Gordon's IQ_rot and it works just fine (At least with the Amp+ board), but you need libwiringPi. PiCorePlayer does not come with wiringPI built in, and there could be a library version conflict as well. I have it compiled and statically linked with wiringPi, I'll send you a link when I get home this evening. That will be a good test to make sure your hardware is wired properly for use with piCorePlayer.
                  That would be really good, thanks.

                  Comment

                  • tbali
                    Member
                    • Jan 2016
                    • 73

                    #10
                    Originally posted by kingswindsor
                    tbali

                    I have done some more research and i believe Moode turns on the Pi's internal pull-ups (like Wiring Pi does).

                    I'm using the rotary encoder from Gordon in IQaudio and there is a lot of information in his guidance and on his github links about the encoder. It's beyond my skill level though to apply it to PiCorePlayer!

                    Am I correct in assuming you have external pull-up resistors in your hardware setup for the rotary encoder? If so, would you be able to share that as I might be able to make progress that way?

                    many thanks
                    Without pull-ups (internal or external) it won't work, there will be too much noise.

                    I took a quick look at the pikeyd source. As I could see the -pu option will turn on the internal pull-ups for both rotary encoder pins. So I would try that in your case. Just stop slimmer and pikeyd with their init.d scripts, and run pikeyd from the command line (foreground) with the -pu switch with sudo. You can use evtest from an other terminal to check if it works. It should.

                    Yes, I have external pull-up resistors (10k) on the encoder's output pins. I have no schematics, these are just simple pull-ups.

                    Comment

                    • kingswindsor
                      Senior Member
                      • Oct 2013
                      • 118

                      #11
                      Originally posted by tbali
                      Without pull-ups (internal or external) it won't work, there will be too much noise.

                      I took a quick look at the pikeyd source. As I could see the -pu option will turn on the internal pull-ups for both rotary encoder pins. So I would try that in your case. Just stop slimmer and pikeyd with their init.d scripts, and run pikeyd from the command line (foreground) with the -pu switch with sudo. You can use evtest from an other terminal to check if it works. It should.

                      Yes, I have external pull-up resistors (10k) on the encoder's output pins. I have no schematics, these are just simple pull-ups.
                      Thanks, I am away for the weekend but will try next week and report back.

                      Comment

                      • kingswindsor
                        Senior Member
                        • Oct 2013
                        • 118

                        #12
                        Originally posted by tbali
                        I took a quick look at the pikeyd source. As I could see the -pu option will turn on the internal pull-ups for both rotary encoder pins. So I would try that in your case. Just stop slimmer and pikeyd with their init.d scripts, and run pikeyd from the command line (foreground) with the -pu switch with sudo. You can use evtest from an other terminal to check if it works. It should.
                        Sorry if I am being dim but what exactly is the command to run pikeyd from the command line? When I try running it with the -pu switch it says there is a syntax error - only start stop or status with no options. I've stopped both Slimmer and Pikeyd.
                        Last edited by kingswindsor; 2016-07-23, 10:05.

                        Comment

                        • kingswindsor
                          Senior Member
                          • Oct 2013
                          • 118

                          #13
                          Originally posted by kingswindsor
                          Sorry if I am being dim but what exactly is the command to run pikeyd from the command line? When I try running it with the -pu switch it says there is a syntax error - only start stop or status with no options. I've stopped both Slimmer and Pikeyd.
                          OK I was being dim. Now have progressed but still not getting any evtest reports from the rotary encoder. Any advice gratefully received. The steps I have been through are:-
                          - reboot
                          - stop slimmer and pikey
                          - checked using top
                          - sudo pikeyd -pu

                          Config file is /etc/pikeyd.conf
                          Polling 2 GPIO pin(s).
                          Found 0 I/O expander(s).
                          Ready.
                          Joystick init OK.
                          Press ^C to exit.

                          - Open new terminal
                          - check running via top - OK
                          - tce-load il evtest
                          - evtest /dev/pikeyd

                          .....................
                          Event code 250 (?)
                          Event code 251 (?)
                          Event code 252 (?)
                          Event code 253 (?)
                          Event code 254 (?)
                          Event code 255 (?)
                          Properties:
                          Testing ... (interrupt to exit)

                          Twiddle rotary encoder - nothing......

                          Just as a reminder, the pikeyd.conf file contains
                          ROT 23 24 KEY_LEFT KEY_RIGHT

                          Any obvious mistakes?

                          Comment

                          • tbali
                            Member
                            • Jan 2016
                            • 73

                            #14
                            Originally posted by kingswindsor
                            Any obvious mistakes?
                            I see no mistakes. Sorry for the late answer, I was on holiday.

                            Comment

                            • N_J
                              Junior Member
                              • Oct 2016
                              • 10

                              #15
                              Very nice development Balázs,

                              I have been experimenting with this over the weekend, but was not able to get it to work unfortunately.
                              The issue seems to be with pikeyd.
                              I work on an RP 3B, and apparently the original pikeyd does not work on this board.
                              I'll post the link in my second post (since I am new to this forum and this is my first post, I am not allowed to share a URL yet :-), but it comes down to this:

                              On RPi2 and RPi3 the GPIO_PERI_BASE address has changed from 0x20000000 to 0x3f000000.
                              So just change #define GPIO_PERI_BASE in joy_RPi.c to 0x3f000000 and it will work like a charm on a RPi3 (couldn't test it on a RPi2)

                              Seems to be a simple fix, but unfortunately I lack knowledge and skills to adapt your pikeyd to work on the RP3 (and 2).
                              would you be able to incorporate that fix and share with the community?

                              Thanks, best regards,
                              Niels

                              Comment

                              Working...