Hello everyone,
I’m having an issue with my spreader setup and I’m not sure why it’s happening or why a reboot fixes it.
My spreader uses two PWM inputs:
- One controls the RPM of the spinning disc (fixed at 2000 PWM),
- The other controls the gate opening percentage (based on vehicle velocity).
I’m using a Lua script to control the gate PWM dynamically — it increases as the vehicle moves faster and decreases when slower. However, sometimes after powering on (just connecting the battery), the gate doesn’t open at all. The disc still spins at 2000 PWM, but the gate remains closed.
If I go to the Compass tab in Mission Planner and click Reboot, everything starts working perfectly — the gate responds to velocity as expected.
Why does a reboot fix this? Could this be due to PWM outputs being in a bad state on boot and only getting properly initialized after rebooting?
@Rolf @Eosbandi @Yuri_Rage - could u help me with this one
Thanks for any insights!