Servos for S3 in uiflow2

  • Hi
    Where can I select a Servo in uiflow2 with a S3?
    I have a high torque servo MG996R and a grove to servo adapter.
    In some tutorials they can easely choose a servor from the menu!?

  • Hi @Schorsch,

    [UIFlow2 environment assumed CoreS3]

    In the original UIFlow there was the following under Advanced > Pin Servo

    However, in UIFlow2 I can't seem to locate the same. Under Software there is the MQTT and other stuff from Avanced. And I couldn't see it under Hardware either, but there is PWM to directly control pin outputs, which might be an option, if you can confirm the servo values.

    0_1696168949696_Screenshot 2023-10-01 at 15.02.18.png

    An alternative thought, switch to Python window in UIFlow2, add equivalent lines from UIFlow and see if the Servo library and function can still be called outside of Blocky
    from servo import Servo

    servo0 = Servo(26,50,500,2500,180)

  • I think I found it under the hardware icons as in or PEM

  • Hi @gavin67890

    I also can not find the RFIDs...
    My servo is behind a PaHub on Channel1!
    I found a similar project, but directly in phyton, no uiflow2:

  • Hi @Schorsch,

    Hmm, that's a little frustrating on the RFID front. I can only assume it's in progress with M5Stack for release (I couldn't see it either in UIFlow2).

    I had a look at the Hackster project, and I think they've been a little tricky with the hub implementation. If you look closely at the images the hub appears to be the 1-to-3 Hub (which operates differently to either the PaHUB or PbHUB).

    I think they have connected the Servo and PIR to the hub Groove connector:
    Pin 1/White input from PIR (Pin 2/Yellow not used)
    Pin 2/Yellow output to Servo (no Pin1/White)
    5V and GND in parallel. Connected to GPIO Port B (Black) on Core.
    Then they've gone for the PaHUB (PortA-Hub) I2C (Red) to connect the other sensors.

    I don't think you will be able to daisy chain your Servo via the PaHUB because it is I2C not GPIO. The good news is the CoreS3 has more ports to play with. Looking at the very tiny image on the CoreS3 documentation, I think Port B GPIO (Black) I/O is on G8/G9 respectively i.e. connect output/G9 to the control line of your servo.

    Port Pin NOTE
    PORT-A(RED) G2/G1 I2C

    It might be worth a try with your servo connected to Port B GPIO (Black) then introduce the other hardware.
    G8/I (White) --> Not connected
    G9/O (Yellow) --> Servo control
    Red--> Red
    Black --> Black

    And then try the PWM blocks in UIFlow2 Blocky with some pauses in between. I don't know what the duty and frequency will be for your servo, so I've shown values copied from the Hackster example.
    0_1696189631602_Screenshot 2023-10-01 at 20.45.38.png

    Shout back if you can at least get some movement out of it. Best of luck.

  • @gavin67890
    Thanks for your time. I will try different stuff. But it seems to be not yet implemented in uiFlow2!

  • The "problem" is, that I really need a 360 servo. To open something by different sensor. It doesnt matter wich one, I like to play with them and sketching my ideas. But without a servo, nothing make sense...
    So please, dear UiFlow2-Alpha developers, Vers. 27 hopefully includes the servos!