当前位置:网站首页>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

边栏推荐
- 1-5 类式组件
- Powercli VMware vCenter deploys conventional new VMS in batch through self built PXE server with one click
- [TA frost wolf _may- "hundred people plan"] art 2.2 model basis
- SAP temporary tablespace error handling
- VS2005 accesses the setting method "recommended collection" of vss2005 through sourceoffsite
- curl (7) Failed connect to localhost8080; Connection refused
- Data warehouse: Doris' application practice in meituan
- Eight performance analysis indicators of effective supply chain management (Part 1)
- Leetcode63. 不同路径 II
- EN 1873屋面用装配附件.塑料单个屋面灯—CE认证
猜你喜欢
随机推荐
请简述list,set,map类型的集合的各自特点(简述三种不同的继承方式下)
Powercl batch creates and manages virtual switches
Real time data warehouse: meituan's implementation of real-time data warehouse construction based on Flink
【微服务】Nacos集群搭建以及加载文件配置
Create AP hotspots for imx6 development board QT system based on rtl8723 cross compile iptables
【MySQL系列】MySQL数据库基础
JS advanced ES6 ~ es13 new features
GhostNets on Heterogeneous Devices via Cheap Operations
Powercli VMware vCenter deploys conventional new VMS in batch through self built PXE server with one click
Detailed explanation of 9 common reasons for MySQL index failure
leetcode 763. Partition Labels 划分字母区间(中等)
1-5 类式组件
Add build dependency error
Working principle of fastdfs (technical principle)
【TA-霜狼_may-《百人计划》】图形3.6 纹理压缩——包体瘦身术
实时数仓:美团点评Flink的实时数仓应用分享
SQL实现将多行记录合并成一行
【TA-霜狼_may-《百人计划》】美术2.2 模型基础
Principle of meter skipping
1-8 basic use of props









![[microservice] Nacos cluster building and loading file configuration](/img/50/7af220c57a06eb186729c9882d9dab.png)