• 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.

Further development of the MMM-Swipe module

Scheduled Pinned Locked Moved Requests
25 Posts 7 Posters 13.7k Views 7 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.
  • R Offline
    richland007 @nowis
    last edited by Mar 26, 2018, 3:48 AM

    @nowis Ok so i got the chance to try it with your suggestions and i guess my connections are right and it sort of works!!!

    I got to read a swipe only once … a Swipe Left and judging from the readings on the console it detects movement but i am unable to replicate any additional swipes granted they are very close to each other and not aligned.
    However do these numbers seem right to you?? judging from this pic that i am attaching …what are these reading in the 3 thousand range?

    Any pointer in the alignment or calibration of the sensors and when i get it to read the swipes left and right correctly does that mean the pages are going to be go left and right also meaning if i swipe from left to right the pages are going to ump one forward and if i swipe from light to left the MM pages are going to go backwards?? that’s our ultimate goal isn’t it

    thanks again
    Denis

    ps. I cant upload a image so here is a text copy of it

    Start: Right
    [MMM-Swipe] Left : [{“dist”:“158”},{“dist”:“3076”},{“dist”:“5593”},{“dist”:“13”},{“dist”:“280”}]
    [MMM-Swipe] Right: [{“dist”:“7”},{“dist”:“3054”},{“dist”:“8”},{“dist”:“165”},{“dist”:“237”}]
    [MMM-Swipe] ----> Swipe Left
    [MMM-Swipe] -------------------------
    [MMM-Swipe] Start: Left
    [MMM-Swipe] Left : [{“dist”:“4”},{“dist”:“2805”},{“dist”:“143”},{“dist”:“7”},{“dist”:“151”}]
    [MMM-Swipe] Right: [{“dist”:“12”},{“dist”:“9”},{“dist”:“12”},{“dist”:“154”},{“dist”:“3”}]
    [MMM-Swipe] -------------------------

    N 1 Reply Last reply Mar 29, 2018, 4:12 AM Reply Quote 0
    • N Offline
      nowis @richland007
      last edited by Mar 29, 2018, 4:12 AM

      @richland007 Hey, I am on vacation right now, so I cannot access my mirror but I will try to help you anyways.
      The output “Start: Right” means the application detected a distance smaller than rightDistance (from the config) and therefore checks if you made a swipe. In your example with the detected left swipe it found a value (7) for the right sensor and so checks if there is a valid swipe.
      For your second example it does not detect a valid swipe, since the first measurement for both sensors is lower than the threshold (I assume so?!). We assume your hand never covers both sensors, so we declare this event as invalid and therefore no swipe.
      To get a feeling for the sensors set calibrate to true and a position for the module in your config. This will print the measured distances for both sensors on your mirror. I experienced I have to make my hand very flat in order to trigger the sensors.

      Regarding the page increment/decrement: Just to be sure, a “Swipe Left” means you start at the right and move to the left. The right sensor is the one on your right side when you look at your mirror and vice versa. Currently a “Swipe Right” sends a PAGE_INCREMENT. If you want to change this, check the function socketNotificationReceived in the MMM-Swipe.js file.

      Hope this helps,

      Simon

      N 1 Reply Last reply Apr 15, 2018, 12:24 AM Reply Quote 0
      • N Offline
        nawak86 @nowis
        last edited by Apr 15, 2018, 12:24 AM

        @nowis Hello can you take a photo and video of your installation ? it’s difficult to properly setup motion detection.

        how did you integrate the sensors on the mirror ?

        Sor for my bad english

        1 Reply Last reply Reply Quote 0
        • T Offline
          thobach
          last edited by Apr 15, 2018, 3:21 PM

          You may also be interested in my gesture sensor module: https://github.com/thobach/MMM-Gestures, which is based on infra red, which I found more reliable and silent :) I developed it after a couple of iterations with ultra sonic sensors like the HC SR04, which didn’t satisfy my needs.

          N 2 Replies Last reply Apr 15, 2018, 3:43 PM Reply Quote 0
          • N Offline
            nawak86 @thobach
            last edited by Apr 15, 2018, 3:43 PM

            @thobach hello, the plugin looks more accurate is it easy to set up?
            can you show me a picture of the wiring?
            I do not know if I will be able to install it,
            it most difficult like MMM-Swipe no ?

            T 1 Reply Last reply Apr 15, 2018, 4:47 PM Reply Quote 0
            • N Offline
              nawak86 @thobach
              last edited by Apr 15, 2018, 3:50 PM

              @thobach lets go i buy this : https://www.amazon.fr/WINGONEER-APDS-9960-ambiante-détection-mouvement/dp/B071VS21M4/ and https://www.ebay.fr/itm/GP2Y0A21YK0F-Capteur-distance-infrarouge-analogique-ARDUINO-robot-IR-SHARP-GP2/292499905194?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649 i wait my product and i try ;)

              1 Reply Last reply Reply Quote 0
              • T Offline
                thobach @nawak86
                last edited by Apr 15, 2018, 4:47 PM

                @nawak86 Unfortunately, it is probably one of the most difficult modules as it consists of two sensors and an Arduino connected to the Pi. The wiring is described at https://github.com/thobach/MMM-Gestures/blob/master/Arduino/MagicMirror2/MagicMirror2.ino#L31 (Arduino) and https://github.com/thobach/MMM-Gestures/blob/master/README.MD. I don’t have a wiring picture.

                You can see it in action though on https://www.youtube.com/watch?v=V8a6UgeoYOU.

                N 1 Reply Last reply Apr 15, 2018, 10:11 PM Reply Quote 0
                • N Offline
                  nawak86 @thobach
                  last edited by Apr 15, 2018, 10:11 PM

                  @thobach f*ck i dont see hardware who is required before !! so i must buy an arduino one can you tell me if it is that : https://www.amazon.fr/Elegoo-Carte-ATmega328P-ATMEGA16U2-Arduino/dp/B01N91PVIS/ ??? infact just plug sensor on arduino send library by software and connect to the raspberry with usb and git clone module et npm install ? for the movement it works with MMM-Pages ? sorry i’m a noob with that ;)

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    nowis
                    last edited by nowis Apr 16, 2018, 8:35 PM Apr 16, 2018, 8:30 PM

                    Hi @nawak86, after setting up the two HC-SR04 sensors, I am not very happy with its performance. It basically works, also with the Pages module.
                    It sounds like @thobach is pretty happy with his gestures module (even you need an Arduino besides the Pi, right?).
                    Here is a picture of how I integrated the sensors into my mirror, I could maybe upload a video in the next days.
                    For connecting everything you need the two sensors, jumper wires, 2 times a 1k Ohm resistance, a breadboard.

                    0_1523910907627_HC-SR04_Sensors.jpeg

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      nawak86
                      last edited by Apr 16, 2018, 10:49 PM

                      hello thank you for your answer @nowis I can try both solutions and make a choice. I’m not against a small video, I’m waiting for @thobach confirms me that the arduino product on amazon is the good. MMM-Swipe works with MMM-Pages but I do not know how MMM-Gesture changes page

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      • 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