# Micropython on ESP32
# לימוד רובוטיקה בתי ספר רובוטיקס בלוקס
# לימוד מיקרופייתון
# https://robotronix.co.il/%d7%a8%d7%95%d7%91%d7%95%d7%98%d7%a8%d7%95%d7%a0%d7%99%d7%a7%d7%a1-%d7%9b%d7%9c%d7%9c%d7%99/%d7%97%d7%95%d7%92-%d7%a8%d7%95%d7%91%d7%95%d7%98%d7%99%d7%a7%d7%94-%d7%a1%d7%a4%d7%a8%d7%99%d7%99%d7%aa-%d7%93%d7%95%d7%92%d7%9e%d7%90%d7%95%d7%aa-%d7%9e%d7%99%d7%a7%d7%a8%d7%95-%d7%a4%d7%99/
from machine import Pin,PWM
import utime
from f import  Servo

# when servo is 
# pwm
pwm = PWM(Pin(15), freq=50, duty=0)
print("1: angle 0 ")
Servo(pwm, 0)
utime.sleep(5)

print("2: angle 90 ")
Servo(pwm, 90)
utime.sleep(5)

print("3: angle 180 ")
Servo(pwm, 180)
utime.sleep(1)