资源简介
本人在2018年11月24-25日的广东省工科技能综合实验大赛中获得了二等奖,实际上因为硬件的问题和场地的问题,我们应该获得更高的奖项的。这是所有源码,python的,使用openmvIDE编辑。

代码片段和文件信息
from pyb import Pin Timer
inverse_left=False #change it to True to inverse left wheel
inverse_right=False #change it to True to inverse right wheel
ain1 = Pin(‘P0‘ Pin.OUT_PP)
ain2 = Pin(‘P1‘ Pin.OUT_PP)
bin1 = Pin(‘P2‘ Pin.OUT_PP)
bin2 = Pin(‘P3‘ Pin.OUT_PP)
ain1.low()
ain2.low()
bin1.low()
bin2.low()
pwma = Pin(‘P7‘)
pwmb = Pin(‘P8‘)
tim = Timer(4 freq=1000)
ch1 = tim.channel(1 Timer.PWM pin=pwma)
ch2 = tim.channel(2 Timer.PWM pin=pwmb)
ch1.pulse_width_percent(0)
ch2.pulse_width_percent(0)
def run(left_speed right_speed):
if inverse_left==True:
left_speed=(-left_speed)
if inverse_right==True:
right_speed=(-right_speed)
if left_speed < 0:
ain1.low()
ain2.high()
else:
ain1.high()
ain2.low()
ch1.pulse_width_percent(abs(left_speed))
if right_speed < 0:
bin1.low()
bin2.high()
else:
bin1.high()
bin2.low()
ch2.pulse_width_percent(abs(right_speed))
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-25 08:52 4pid和普通的结合\
文件 1034 2018-11-25 00:43 4pid和普通的结合\car.py
文件 6732 2018-11-25 03:00 4pid和普通的结合\hand.py
文件 8962 2018-11-25 08:26 4pid和普通的结合\main.py
文件 2744 2018-11-21 18:43 4pid和普通的结合\move.py
相关资源
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
- Python操作Mysql教程手册
- Python Machine Learning Case Studies
- python获取硬件信息
评论
共有 条评论