I have a button where one leg is connected to A8 on the Daisy Seed (pin 30) and the other to GND. Whenever I push code onto it where I’m calling debounce on the switch I declared and then check for if it’s pressed, my Daisy Seed immediately crashes. The moment I comment out that code, it works fine. not sure why this is, any help would be great
I believe you should use D23 (Same pin on the Seed as A8) instead for a switch, since you need a boolean value, not an analog value.
Here is a code example that I am using which is currently working well.
Switch clock_switch; clock_switch.Init(D24, 0.f, Switch::Type::TYPE_MOMENTARY, Switch::Polarity::POLARITY_NORMAL, Switch::Pull::PULL_NONE);
When doing this do you still check it the same with clock_switch.Pressed()?
Yes, you still have all the same methods of the Switch class