Adding a button to start and stop haptic intervals

Does anyone know if it's possible to add a button to start and stop intervals? From my research it doesn't seem possible because there aren't any +/gnd pins to hook up to. That said, would it be possible using the GPIOs?

Comments

  • edited June 2015
    Do you want to add your own button or do you want to use the on-board MetaWear button?

    You can add an event that triggers on the button press with the on-board button:

    [device.mechanicalSwitch.switchUpdateEvent programCommandsToRunOnEvent:^{
        [device.hapticBuzzer startHapticWithDutyCycle:255 pulseWidth:500 completion:nil];
    }]

    You can also add an event trigger on a GPIO pin.

    Send me some more details so I can help you out a little better; if you are looking for a new feature let me know and we can include it (if possible) in the next firmware release.
  • Hi @Laura! Thanks for getting back to me. 

    I'm currently looking to add a button using GPIO. Do you have any recommendations about which might be good with the size of this board?  

    I like that you have a button on the board, but it's unaccessible with the current case. A cool option for a new case would be one where you could have a button on the outside of the case that was able to interact with the button on the board. 

     What I'm trying to do is make a button that can be an "interactive interface" for some of the following use cases:

    -Turn board on/off
    -Have different scenarios triggered depending on how long the button is held down/how many times it's pushed (e.g., pushing it 3 times will trigger the LED to show the relative battery level depending on it's charge like 60+ - green, 20-60 - yellow, 20 and below - red.
    -It could also pause/reset the current code being run and start over whatever that might be. 

    Anyway I hope this helps. And btw I'll be glad to share my code open source on Github in Swift when I get it finished if that's helpful to you. 

    Thanks!
  • Hey @aaronmb7,

    We are in process of launching a MetaWear complete with a professionally designed cased with exposed button: https://www.kickstarter.com/projects/guardyen/metawear-coin-build-your-own-wearable-sensor-produ/

    Also with respect to the "interactive interface", we could use the event system to flash LED's on different button press and hold events.  

    However, the board is really always "on" since the battery is always connected, but it will go into very low power state automatically.  Also, "pausing/reseting current code" might not be the best way to think about how the MetaWear behaves.  It's really more of a reactive paradigm, that is when X event happens we should do Y.
  • Thanks for getting back to me and explaining a bit more about the board. After working with it for a few weeks I've been thinking about some better ways to interact with it. I'm really looking forward to the new COIN board on KS. I've already backed it :-). Hopefully that goes through for you guys. 
This discussion has been closed.