LoginSignup
5
6

More than 3 years have passed since last update.

Raspberry Pi Picoで サーボモーターを動かす

Posted at

接続図

SERVO.jpg

microPythonのソースコード

from machine import PWM, Pin
import time

servo1 = PWM(Pin(28))
servo1.freq(50)

while True:
    servo1.duty_u16(1500)
    time.sleep(1)
    servo1.duty_u16(3000)
    time.sleep(1)

参考

開発環境のセットアップは下記を参考にしてください。
- M1 Macで Raspberry Pi PicoのLチカ

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6