pdf-icon

UIFlow Guide

UiFlow1 Blockly

Event

Unit

UiFlow1 Project

Unit Servo

Example

Start the motor

from m5stack import *
from m5stack_ui import *
from uiflow import *
import unit

screen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)
servo_0 = unit.get(unit.SERVO, unit.PORTC)

servo_0.write_angle(0)
servo_0.write_us(600)

API

servo_0.write_angle(0)
  • Set the zero-degree rotation Angle
servo_0.write_us(600)
  • Set the pulse
On This Page