Jopyth / MMM-Buttons

This module can be used to to connect buttons to your Magic Mirror²
41 stars 9 forks source link

Struggling to get button working with MMM-Carousel #10

Open mirror-master opened 3 years ago

mirror-master commented 3 years ago

I was wondering if you know how to get a physical button to work with MMM-carousel. I have been struggling to get the button to move the slides. Its been a while and i lost progress i had. tried this just to get one slide button working to no avail.

` { module: 'MMM-Buttons', config: { buttons: [ { pin: 25, name: "monitor_control", longPress: { notification: "REMOTE_ACTION", payload: {action: "MONITOROFF"} }, shortPress: { notification: "REMOTE_ACTION", payload: {action: "MONITORON"} } }, { pin: 18, name: "ArrowRight", shortPress: {

                notification: "CAROUSEL_NEXT",
                payload: {action: "CAROUSEL_NEXT"}
            },
            longPress: undefined
        }
    ]
}

}, `

chietsuki commented 3 years ago

Hi,

This syntax works for me:

    { module: 'MMM-Buttons',
      config: {
        buttons: [
          { pin: 17,
            shortPress: {
              notification: 'CAROUSEL_NEXT'
            },
            longPress: undefined
          }
        ]
    } },