I found out why the LED was turning on but not off when the vibration sensor was triggered.
Much time was lost using the wrong schematic! Oops. I wasn’t really thinking about proper switch connection (include both a high and low state for the input to read), and so used this connection:
the schematic looks like this:
When I should have used was one of these connections:
The difference between the two is that the top one (floating input) will trigger a response when the switch is closed, but will not reset the trigger (the Gemma sees the input as remaining low, even if the switch is open), while the bottom one will trigger (input goes low), then reset (input goes high when switch is open) and wait for the next trigger.
Unfortunately, even after getting the proper connection, testing showed that the vibration sensors are just not sensitive enough to pick up footsteps while mounted on a hat. I could set them off by jumping, but not by normal walking or even stomping.
Some rethinking of the ideas behind the treasure map hat are in order.
Perhaps I can use time instead of movement?