Hi,
Have you written any code?
Even with the example in post #1 has some structure and an order of doing things,
Your posted example shows no logical flow.
You MUST load the servo library first, then setup input and output ports, then iinitialize the servo, then read a button, then drive the servo.
I am not sure what your posted example is supposed to do.
Try this example of graphic coding with Adafruit;
Its call MakeCode.
Tom... ![]()