MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Navigate, Issues with KY-040 rotary encoder

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    15 Posts 2 Posters 1.8k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @stinkycol
      last edited by

      @stinkycol pm2 has lots of commands

      in linux the convention is commands provide help two ways

      1. using the --help param
      2. providing a manual page, seen with man program_name

      pm2 status will show you what is defined and what its state is
      you can control individual apps (I have 10 defined on one system)
      with the number of the row that matches their name or the actual name (oops I have 3 MagicMirror apps defined in different locations, so I have to use the row number

      pm2 stop xx

      or if you know what they are you can stop them all
      pm2 stop all

      you can restart an app too

      etc…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @stinkycol
        last edited by

        @stinkycol i have seen that error on other posts, and it sounds like there are some new tests on setting up the gpio pins.

        the code wants 3 pins,
        the node_helper code

        		console.log('MMM-Navigate, listen on GPIO PINs (BCM): '+self.config.GPIOPins[0]+','+self.config.GPIOPins[1]+','+self.config.GPIOPins[2]);
        		const CLK = new Gpio(self.config.GPIOPins[1], 'in', 'both',{debounceTimeout : 0 }); //BCM Pin 20
        		const DT = new Gpio(self.config.GPIOPins[0], 'in', 'both',{debounceTimeout : 0 }); //BCM Pin 26
        line 38		const SW = new Gpio(self.config.GPIOPins[2], 'in', 'both',{debounceTimeout : 20 }); //BCM Pin 19
        

        the error is on the last, which is the one you added to the boot time config.
        I think ‘both’ incorrect for this.

        when you used profileswitcher, what module did you use for connecting the encoder? as that module doesn’t have a hardware component

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 2 Replies Last reply Reply Quote 0
        • S Offline
          stinkycol @sdetweil
          last edited by

          @sdetweil I used MMM-GPIO-Notifications as i was using this on my other build to use simple buttons to swap pages.

          On the latest run I still get the errors:
          npm MM startup.png

          These are the entries in the config.js:
          npm MMM-ProfileSwitcher.png

          npm MMM-GPIO-Notifications.png

          npm MMM-Navigate.png

          This is the npm output as i move the KY040:
          npm MM running output.png

          1 Reply Last reply Reply Quote 0
          • S Offline
            stinkycol @sdetweil
            last edited by

            @sdetweil sorry I don’t write understand how you figured that the last one was causing the issue and is this an issue with boot/firmware/config? Did this mean that I should replace the gpio in the MMM-Navigate module on config.js to the sudonyms?

            GPIOPins:[DT, CLK, SW]

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @stinkycol
              last edited by

              @stinkycol I looked at the line numbers reported in the stack trace dump that came along w the write error

              I do not know what the solution is

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                stinkycol @sdetweil
                last edited by

                @sdetweil OK thanks for trying

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @stinkycol
                  last edited by

                  @stinkycol the gpio notifications module does the gpio connection differently

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 2 / 2
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy