• 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-Buttons keine Reaktion?

Scheduled Pinned Locked Moved Solved Troubleshooting
3 Posts 1 Posters 1.2k Views 1 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
    robiv8
    last edited by Dec 30, 2018, 7:59 PM

    Hello,
    is there a log where i can see if something happens when the button press.
    Have MMM buttons run on the Raspi and a pushbutton on Ground and pin 11 (gpio17) plugged.
    Nothing reacts when I push? Do i still have to adjust something?

    Hallo,
    wo gibts denn ein log wo mann schauen kann ob sich was regt beim button drücken.
    Habe MMM-Buttons am laufen und am Raspi ein Pushbutton auf Ground und Pin 11 (gpio17) gesteckt.
    Nix reagiert? Muss ich noch was anderes einstellen oder einschalten?

    MMM-PageSelect läuft auch damit ich mehrere Seiten habe.
    
    buttons: [
                {
                    pin: 11, //The pin that connects your first button
                    name: "Hauptseite", //Or whatever you really want
                    longPress: { //longPress or shortPress doesnt matter. Really it's just the stuff on the inside that matters.
                        notification: "PAGE_SELECT",
                        payload: "haupt" //Or whatever page you want
                    },
    shortPress: {
                        notification: "PAGE_SELECT",
                        payload: "zweite" //Or whatever page you want
                    }
                },
    

    Danke

    1 Reply Last reply Reply Quote 0
    • R Offline
      robiv8
      last edited by Jan 1, 2019, 11:50 AM

      with a python.py and this code:

      import RPi.GPIO as GPIO
      import time
      
      GPIO.setwarnings(False) # Ignore warning for now
      GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
      GPIO.setup(11, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
      
      tries = 0
      
      while (tries < 200):
          if GPIO.input(11):
              print("11 Open")
          else:
              print ("Close")
          time.sleep(1.)
          tries = tries + 1
      
      #GPIO.cleanup()           # clean up GPIO on normal exit
      

      With this code I can see that the button works and triggers.
      But in magicmirror pm2 log mm it shows no reaction!
      Do i have to adjust something else?
      Thanks and a happy new year 2019

      1 Reply Last reply Reply Quote 0
      • R Offline
        robiv8
        last edited by Jan 1, 2019, 10:31 PM

        OK it was the pin!
        The correct PIN number is really impossible ;-)

        But it is very confusing with pin BCM and BOARD
        So the BOARD PIN is correct.

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