Read the statement by Michael Teeuw here.
MMM-Navigate, Issues with KY-040 rotary encoder
-
did you try adding tge line to /boot/config.txt
-
Hi, yes I tried that but when editing boot/config there was an entry inside saying it had moved to boot/firmware/config so I added it there.
-
@stinkycol the dependency for onoff is in the package.json, and would be loaded in the module node_modules folder during npm install
the fact that you don’t have a black screen error indicates it is installed and I see the module has the updated postinstall step to make sure it has the correct binary level matching the electron version
did you look at the output of npm start to verify the module loaded correctly?
-
@stinkycol This is the message i see when i try to edit boot/config:
-
@sdetweil said in MMM-Navigate, Issues with KY-040 rotary encoder:
did you look at the output of npm start to verify the module loaded correctly
this is what I am looking for
when you do npm start. MagicMirror puts out message
if you use pm2 to autolaunch MM during boot
then the command
pm2 logs --lines=nnwhere nn is some number of lines to display, default 15
will display the collected logs…generally I recommend NOT using pm2 during module adds and reconfigures to be able to review these messages more easily.
-
@sdetweil said in MMM-Navigate, Issues with KY-040 rotary encoder:
@stinkycol the dependency for onoff is in the package.json, and would be loaded in the module node_modules folder during npm install
the fact that you don’t have a black screen error indicates it is installed and I see the module has the updated postinstall step to make sure it has the correct binary level matching the electron version
did you look at the output of npm start to verify the module loaded correctly?
Hi, firstly I would like to thank you for helping me out especially as i am so new to this. There are messages on the npm report but I was starting the MM from my terminal on the screen and i didn’t see the messages since the mirror started up and covered them but I have started using Putty and now i can see them. I see that there is an exception that has onoff in the message so perhaps it hasnt been loaded correctly?
-
@sdetweil I am using PM2 in my other build but i haven’t implemented it in this one as i just wanted to confirm the KY040 code worked before moving on to autostarting
-
@stinkycol pm2 has lots of commands
in linux the convention is commands provide help two ways
- using the --help param
- 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 numberpm2 stop xx
or if you know what they are you can stop them all
pm2 stop allyou can restart an app too
etc…
-
@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 codeconsole.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
-
@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:
These are the entries in the config.js:
This is the npm output as i move the KY040: