当前位置:网站首页>Intelligent trash can (VII) -- Introduction and use of sg90 steering gear (Pico implementation of raspberry pie)
Intelligent trash can (VII) -- Introduction and use of sg90 steering gear (Pico implementation of raspberry pie)
2022-07-29 00:09:00 【Light chasing rain】
List of articles
One 、SG90 Pin introduction of steering gear
Three wires will be led out of the steering gear : Namely GND( Brown line )、VCC( Red thread ) and SIG( Yellow line ), It's the ground wire 、 power cord (5V) And signal line . Never get it wrong !

Two 、 And pico Pin docking

yellow ( cable ) —>GPIO0
Brown ( The bottom line GND) —>VBUS
Red ( power cord VCC) —>GND
3、 ... and 、 Operating principle of steering gear
1638-8192(0-180)
sg90 principle : stay 50hz The period at frequency is 20ms
t = 0.5ms——————- The rudder turns 0 °
t = 1.0ms——————- The rudder turns 45°
t = 1.5ms——————- The rudder turns 90°
t = 2.0ms——————- The rudder turns 135°
t = 2.5ms——————- The rudder turns 180°
duty_u16 computing method ,90 Degree time 65532*1.5/20 Get the value of the ,
Four 、Thonny Program
from machine import PWM,Pin
import utime
s = PWM(Pin(0))
s.freq(50)
s.duty_u16(4915) # 4915 yes 90 degree
utime.sleep(2)
s.duty_u16(8192) # 8192 yes 180 degree
utime.sleep(2)
s.duty_u16(1638) # 1638 yes 0 degree
5、 ... and 、 Effect display

边栏推荐
- Leetcode60. 排列序列
- VMware VCSA 7.0 Install
- Data warehouse: Doris' application practice in meituan
- 研发效能的道法术器
- Multi sensor fusion positioning (I) -- 3D laser odometer
- Leetcode61. 旋转链表
- centos7安装mysql8
- NAT如何配置地址转换
- Briefly introduce the working principle and characteristics of block cipher encryption block link mode (cryptography shift cipher encryption and decryption)
- Have passed hcip and joined the company of your choice, and share the learning experience and experience of Huawei certification
猜你喜欢
随机推荐
EN 1935 building hardware. Single axis hinge - CE certification
pip镜像下载
Build SSM project with JSP as view parser
Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)
ISO 13400(DoIP)标准解读
VMware VCSA 7.0 Install
Arm-a53 data "recommended collection"
CANoe应用案例之DoIP通信
数仓:Doris在美团的应用实践
Add build dependency error
Wildcard ssl/tls certificate
2022-07-28:以下go语言代码输出什么?A:AA;B:AB;C:BA;D:BB。 package main import ( “fmt“ ) func
JS four formulas for judging data types
失败率高达80%,数字化转型如何正确完成战略规划?
Hutool official website (is hutool easy to use)
Multisensor fusion positioning (III) -- inertial technology
Leetcode63. Different paths II
PowerCLi VMware vCenter 通过自建的PXE Server一键批量部署常规New-VM
Leetcode62. Different paths
Use pytoch to quickly train the network model








