Problems with Vibrator Motor Unit in uiflow



  • The Vibrator Motor Unit is still missing as a unit in uiFlow 1.2.3 and 1.4.5. The official sample code (https://docs.m5stack.com/#/en/unit/vibrator ) won't work with M5Stack fire. The program always crashes when I try to digitalWritePin 26. Any ideas how to get vibrator motor working?


  • M5Stack

    you need to use the PWM blocks instead of digitalwrite, digital write is just for off and on but PWM can control the speed of the motor



  • Same thing for me on the Fan unit (which has the same N20 motor as the Vibrator motor unit). I tried PWM on Pin 26, but it just crashes after running the program.

    0_1588963069604_Screen Shot 2020-05-08 at 2.37.38 PM.png

    Even if I upload an empty flow with blank setup and loop functions, as soon as the M5Stack Fire boots, it tries to start the fan and crashes/reboots.

    I'm testing on Port B. If I switch to Port A, that port has power all the time and turns the motor on full blast and I'm not able to control it.



  • Don't use it on port A use it only on port B.
    Confirmed, the motor doesn't work properly.
    I am sure that the unit only works as on or off as it only has an on/off transistor not a PWMable transistor.