• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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-Swipe - Hand gestures

Scheduled Pinned Locked Moved Troubleshooting
45 Posts 17 Posters 40.1k Views 16 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.
  • M Offline
    mochman Module Developer @BeLuGe
    last edited by Sep 2, 2016, 11:06 PM

    @BeLuGe So I just tried this myself. When I created the module, I was connected to the pi to test. I just tried using SSH to start the program and got the same error you’re getting. Looks like it’s a issue with running a sudo command over SSH, the workaround I found was to run sudo cp ~/.Xauthority /root/ then run DISPLAY=:0 sudo npm start. The problem with this is that everytime you restart your mirror you will need to run the copy command again.

    @Mitchfarino You don’t need a breadboard. I just used one to test out my configuration. You can hook it up directly to the pi using those wires you have already connected. When I tested out my setup, I used these pins.

    echoLeftPin: 24,       
    triggerLeftPin: 23,     
    echoRightPin: 26,      
    triggerRightPin: 25,   
    

    Remember that those are the GPIO #'s and not the physical pin #.

    M 1 Reply Last reply Sep 2, 2016, 11:46 PM Reply Quote 0
    • M Offline
      Mitchfarino Module Developer @mochman
      last edited by Sep 2, 2016, 11:46 PM

      @mochman I have vcc, trig, echo and gnd on my sensor - how do they map to the config you have posted?

      M 1 Reply Last reply Sep 3, 2016, 11:21 AM Reply Quote 0
      • M Offline
        mochman Module Developer @Mitchfarino
        last edited by Sep 3, 2016, 11:21 AM

        @Mitchfarino

        Your left sensor

        Vcc goes to pin #2
        Gnd goes to pin #6
        Trig goes to physical pin #26 (Which is labeled GPIO 23)
        Echo goes to physical pin #18 (Which is labeled GPIO 24)

        Your right sensor

        Vcc goes to pin #4
        Gnd goes to pin #9
        Trig goes to physical pin #22 (Which is labeled GPIO 25)
        Echo goes to physical pin #37 (Which is labeled GPIO 26)

        You need both sensors if you want to detect movement.

        M 1 Reply Last reply Sep 3, 2016, 11:22 AM Reply Quote 1
        • M Offline
          Mitchfarino Module Developer @mochman
          last edited by Sep 3, 2016, 11:22 AM

          @mochman OK, I’m an idiot!

          I only have one sensor! Ha

          Thanks very much for your help, I’m gonna get one ordered then get back on it.

          Sorry for the daft questions

          1 Reply Last reply Reply Quote 0
          • M Offline
            mochman Module Developer
            last edited by Sep 3, 2016, 11:25 AM

            No worries. Yeah the sensor looks like it has 2 detectors on it. I’m pretty sure one is the speaker and the other is the microphone detector.

            1 Reply Last reply Reply Quote 1
            • B Offline
              BeLuGe
              last edited by Sep 3, 2016, 12:27 PM

              @mochman when I use your workaround i get the following errormessage and a whitescreen:

              Loading config ...
              Loading module helpers ...
              No helper found for module: alert.
              Initializing new module helper ...
              WARNING! Could not load config file. Starting with default configuration. Error found: Error: Module version mismatch. Expected 49, got 48.
              Loading module helpers ...
              No helper found for module: alert.
              Initializing new module helper ...
              App threw an error during load
              Error: Module version mismatch. Expected 49, got 48.
                  at Error (native)
                  at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:167:20)
                  at Object.Module._extensions..node (module.js:568:18)
                  at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:167:20)
                  at Module.load (module.js:458:32)
                  at tryModuleLoad (module.js:417:12)
                  at Function.Module._load (module.js:409:3)
                  at Module.require (module.js:468:17)
                  at require (internal/module.js:20:19)
                  at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-usonic/lib/usonic.js:5:14)
              Whoops! There was an uncaught exception...
              Error: Module version mismatch. Expected 49, got 48.
                  at Error (native)
                  at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:167:20)
                  at Object.Module._extensions..node (module.js:568:18)
                  at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:167:20)
                  at Module.load (module.js:458:32)
                  at tryModuleLoad (module.js:417:12)
                  at Function.Module._load (module.js:409:3)
                  at Module.require (module.js:468:17)
                  at require (internal/module.js:20:19)
                  at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-usonic/lib/usonic.js:5:14)
              MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              If you think this really is an issue, please open an issue on GitHub: 
              https://github.com/MichMich/MagicMirror/issues
              Launching application.
              
              
              1 Reply Last reply Reply Quote 0
              • M Offline
                mochman Module Developer
                last edited by Sep 3, 2016, 1:06 PM

                Can you make another config.js file with just the MMM-Swipe module in there? I don’t know what the:
                WARNING! Could not load config file. Starting with default configuration. Error found: Error: Module version mismatch. Expected 49, got 48. means.

                1 Reply Last reply Reply Quote 0
                • B Offline
                  BeLuGe
                  last edited by Sep 3, 2016, 2:22 PM

                  @mochman I change the config file to default and add your Module. The same errormessage.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mochman Module Developer
                    last edited by Sep 3, 2016, 5:50 PM

                    @BeLuGe Try running rm -rf node_modules/ inside the MMM-Swipe folder then running npm install again.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      BeLuGe
                      last edited by Sep 3, 2016, 7:48 PM

                      @mochman I have delete the directory and install the packages with npm install
                      And I have reinstall the complete Raspberry and install only your module.
                      The error is still there

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 2 / 5
                      2 / 5
                      • First post
                        13/45
                        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