Motor on/off with aux switch?

Hi all, is there a way to wire up and set up a config for a motor to be turned on/off with the auxiliary switch to conserve power while in the hilt?

Sure there are probably more than a few ways.
One pretty straight forward way would be to have the blade style for the motor toggle it on and off. (The motor speed is controlled by brightness, so the following would be 100% ON, and 0% OFF)
You could set a button control event that you want the AUX button to do (like double click or something for example) then set it to an available effect (like a USER effect).
That in turn can have your blade style for the motor control the LED FET and turn it ON/OFF.

Something like this in the prop file

case EVENTID(BUTTON_AUX, EVENT_SECOND_CLICK_SHORT, MODE_OFF):
case EVENTID(BUTTON_AUX, EVENT_SECOND_CLICK_SHORT, MODE_ON):
  Saberbase::DoEffect(EFFECT_USER1);
  return true;

Then your blade style for the motor can be something like:

StylePtr<EffectSequence<EFFECT_USER1,White,Black>>()

Each double click of AUX would turn the motor ON or OFF, regardless of the blade running or not.

2 Likes

Nice okay! What pads on the board do I wire the motor to?

Motor positive direct to battery (+).
Motor negative to one of the LED pads.
Adjust the bladePowerPin value in the config to match.
So LED 5 would be bladePowerPin5.
The color channel you use is irrelevant if you use White in the blade style (because it encompasses all 3 RGB anyway).

So something like this for a blade definition
SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),

1 Like

Okay I think I’m grasping it! I’ll start there! Thanks for your help