Spin to drive it all

I am helping someone use a Proffiboard in a Beyblade. It’s essentially a spinning top. I thought we could just use spin as on / off.
It would be simplest actions:
Spin activates “ignition”.
Clashes work as usual as it bumps into other things, random quotes play via bladestyle, etc…
Then when it slows below Spin speed, it turns off.

I thought I could just do this in hybrid_font.h to have it work, and then adjust the smoothsw.ini parameter for AccentSwingSpeedThreshold to dial in the on / off.

AM I missing something because no matter how low AccentSwingSpeedThreshold is set, it doesn’t seem to activate when spinning.

These are the changes:

In StartSwing()

@@
 #ifdef ENABLE_SPINS
             if (angle_ > font_config.ProffieOSSpinDegrees) {
-              if (SFX_spin) {
-                SaberBase::DoEffect(EFFECT_SPIN, 0);
-              }
+              if (!SaberBase::IsOn()) TurnOn();
               angle_ -= font_config.ProffieOSSpinDegrees;
-            }
+            } else if (SaberBase::IsOn()) TurnOff(OFF_NORMAL);
 #endif

anf then don’t play spin sound in SB_Effect()

// #ifdef ENABLE_SPINS
//       case EFFECT_SPIN:
//         if (guess_monophonic_) {
//           PlayMonophonic(&SFX_spin, &SFX_hum);
//         } else {
//           swing_player_ = PlayPolyphonic(&SFX_spin);
//         }
//         return;
// #endif

Is it not this simple?

It might be that simple, however, a spinning top spins much faster than a blade, and I’m not sure if the gyro will keep up. Let me see, maximum is 2000 degrees per seconds, or ~300 rpm, which may not be enough to handle a spinning top properly. I checked the data sheet of the motion chip, and 2000 dps is the maxium the chip can report.

Besides all that, something needs to keep the motion chip on to detect spins.
Finally, ProffieOS ignores spins around the X axis by default, only Y and Z spin counts. Depending on how the board is mounted, that might need to be fixed.

It may be better to use the accelerometer to detect spin. It should show a constant, large force unless it’s mounted dead center.

1 Like

Cool thanks. So something with fusor then instead.
I guess I need to figure out a good place to detect that in existing places things or maybe add something to a config that just runs that detection.

1 Like

There are two toys my son and I both regret getting rid of, and gen 1 bay blades is one of them.

Giving a young adult a proffieblade wouldn’t make up for it, but please post your solution and I’m gonna try.

A+ idea