登录
首页 » c » 四路寻迹

四路寻迹

于 2023-04-27 发布 文件大小:27.11 kB
0 88
下载积分: 2 下载次数: 1

代码说明:

#include #define CAR_SPEED_MAX 10 //最大速度 sfr P4=0xe8; sbit PWM_R=P1^7; //PWM输出 sbit PWM_L=P1^2; sbit Moto_RA=P1^6; sbit Moto_RB=P1^5; sbit Moto_LA=P1^4; sbit Moto_LB=P1^3; //左右电机驱动 unsigned char Moto_Speed_R; //右轮速度 unsigned char Moto_Speed_L; //左轮速度  unsigned char Moto_Speed_Num; //PWM调速 sbit INF_R0=P4^3; //循迹 右侧内传感器 sbit INF_R1=P4^2; //循迹 右侧外传感器 sbit INF_L0=P4^1;   //循迹 左侧内传感器 sbit INF_L1=P4^0;   //循迹 左侧外传感器 unsigned char Car_Sta; //电机启动速度 /*********************************** *函数名称:void Delay(unsigned char num) *函数功能:延时 *参数说明:num 延时时间 数值最大255 *返回说明:无 *其它说明:不精准延时 ***********************************/ //void Delay(unsigned char num) //{ // unsi

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • k_eps
    A UDF of k epsilon model which can be used for modified turbulence modelling calculations with ansys fluent
    2015-03-21 11:38:08下载
    积分:1
  • array-master
    说明:  矩阵计算array类C++代码, 可直接使用,也可作为继承的父类(Matrix computation array class C++ code)
    2019-06-30 21:15:29下载
    积分:1
  • 178classicCcore
    经典基础学习资料,对学习C语言,且有志于在C语言上钻研的同学是非常好一手资料,注重基础(Classic-based learning materials)
    2009-11-01 21:11:07下载
    积分:1
  • paixu
    各种排序算法的实现,如快速排序,冒泡排序,选择排序,堆排序,二分插入排序等(Implementation of various sorting algorithms, such as quick sort, bubble sort, selection sort, heap sort, binary insertion sort, etc.)
    2010-09-28 22:20:55下载
    积分:1
  • Samples_faceamouth
    opencv人脸识别opencv人脸识别opencv人脸识别(Face recognition opencv opencv opencv face recognition)
    2014-06-02 19:56:57下载
    积分:1
  • flybear1028
    说明:  加速传感器库的应用,基于ardino平台(Accelerate the application of sensor Library Based on ardino platform)
    2020-06-20 23:40:01下载
    积分:1
  • t_windows
    透明窗体,可一始终悬浮在窗口上,背景可一是视频或图象等,也就是窗口的分层。。。。(trans windows)
    2009-12-31 15:12:27下载
    积分:1
  • MAT0.0PCAP1.0PLPC2103
    本代码基于keil3编译,实现LPC2103的CAP1.0和MAT1.0捕获功能(The code is based on keil3 ,help LPC2103 realise the CAP1.0 and the MAT1.0 function )
    2012-03-14 09:53:50下载
    积分:1
  • T12烙铁控制板,原理图,PCB,BOM清单及程序。
    【实例简介】可直接打样,内含原理图,BOM,程序。
    2021-08-25 00:30:52下载
    积分:1
  • fangweijiao
    利用窗体程序,通过输入两个坐标值,实现计算这两个之间的方位角。左侧输入,右侧则显示方位角。结果显示在最下方。(By using the form program, we calculate the azimuth between the two points by entering two coordinate values. The left is on the left, and the azimuth is displayed on the right. The results are shown at the bottom.)
    2018-04-15 20:30:54下载
    积分:1
  • 696518资源总数
  • 105578会员总数
  • 20今日下载