-
Fri 2021.06.11
Hi @user129965
'but I have no clue how to combine it with being a trigger.'
One method might be to wire a GPIO pin used as an output, to a GPIO input pin and supply the logic for a setWatch that detects the logic level change. Inside the (say magnetomer) on() event, use digitalWrite() to set the GPIO output pin. The watch logic would respond to that logic level change on the input pin.
See snippet for on() event and possible GPIO pins to use
Hi.
I have been trying to work on a small project using Puck.js. I am not a JS expert though and thought maybe I could get some help here.
The goal is for Puck to be a music controller similar to https://www.espruino.com/BLE+Music+Control
but instead of clicking, significant motion (sensed by accelerometer or magnetometer) would be the trigger of play/pause/skip of songs. I know how motion detection works with Puck, but I have no clue how to combine it with being a trigger.
Thank you in advance!