How to control a RC servo motor synchronized with DoBlast() in ProffieOS 2.2?

Hi Fredrik and everyone,

I am currently building a custom Blaster prop using Proffieboard V2.2 (ProffieOS 2.2).
My current config and custom prop are working perfectly with:

  • #define DISABLE_MOTION and #define DISABLE_SPINS to kill all motion noises.
  • Trigger (BUTTON_POWER, Pin 23) successfully triggers DoBlast().
  • Button 1 (BUTTON_AUX, Pin 1) successfully toggles a green LED on/off via custom bool flag my_green_led_onwith EFFECT_CLASH sound.

Now, I want to connect a standard RC servo motor to Data3 pad (Digital Pin 22) and achieve the following timeline when firing:

  1. Usually stays at 10 degrees (Ready position).
  2. When DoBlast(); is executed, the servo should move to 120 degrees at a specific controlled speed.
  3. After reaching 120 degrees and waiting for a short physical lag (e.g. 300ms), it should snap back to 10 degrees as fast as possible.

Since ProffieOS occupies hardware timers for audio and blade styles, regular Arduino <Servo.h> causes conflicts and doesn’t work inside Event2.

What is the most standard, recommended way to control a servo with specific speed and angle timing inside a custom prop file without breaking audio? Should I use any built-in functions or a specific blade style approach?

Thank you so much for your help!

V2 boards don’t support servos, all the timers are already being used for something.
Get a V3 board, then use ServoBladePtr, and then you can use a blade style to control the servo.

More information:

Ok, Thank you very much!!