Got some weird button behavior going on here. What would cause Main/Aux to only work for retract. Saber activates fine with twist on. I can turn off with Main. But cant activate. In short, it seems main only works for turning blade off, not on. Heres a video to better describe whats happening:
#define NUM_BLADES 4
#define NUM_BUTTONS 2
#define VOLUME 1900
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 2.0
#define FETT263_SWING_ON_SPEED 350
#define IDLE_OFF_TIME 60 * 15 * 1000
Hook up to Serial Monitor, replicate and post here.
EVENT: Power-Pressed#1 ON millis=526820
EVENT: Power-Pressed ON millis=526820
EVENT: Power-Released#1 ON millis=526981
EVENT: Power-Released ON millis=526981
EVENT: Power-Shortclick#1 ON millis=526981
unit = 1 vol = 0.50, Playing RogueVader/in/in01.wav
channels: 1 rate: 44100 bits: 16
No sounds found: pstoff
This only registers when saber is ON. Saber only turns on through Twist or Swing.
Need the output when saber is Off and you press the button, this just shows it works.
Saber does not register buttons when OFF. Only when ON. So youre not going to see anything in Serial for button clicks when ON
This has me really wondering what’s going on. I’ve never heard of anything like this before.
You press buttons while blade is off and Serial Monitor shows nothing happening.
Then, once the blade is on by doing a twist gesture, you get button pressed messages.
This is a standard momentary button, not touchbutton or anything special.
You’ve confirmed the wiring is standard: one leg of the switch to a button pad on the board, and the other to GND (NOT an LED pad controlled by FETs).
Is all that correct?
Have you checked at the pads with a continuity test that the button is actually working?
Have you manually shorted the button pad to GND with a jumper and observed the serial monitor messages?
Have you tried a different button pad (like button 3 instead)? Any difference?
These are the questions.
Yeah, sounds like the button is wired to an LED pad instead of a Ground pad, that would explain the odd behavior. Check the wiring.
Maybe a photo of the board might help…