登录
首页 » c » 四路寻迹

四路寻迹

于 2023-04-27 发布 文件大小:27.11 kB
0 120
下载积分: 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 个回复

  • radiusclient-ng-0.5.6.tar
    this is an open source radius client that run in linux and apply to login with radius and some other radius tools. like radtest...
    2011-01-19 16:05:08下载
    积分:1
  • C#生成一维码 二维码 条形码实例
    本实例实现了以下功能:   1.39条码生成功能   2.EAN-13条码生成功能   3.Code128条码生成功能   4.QR Code码制的二维条码生成   5.二维码制的解析功能    
    2013-04-22下载
    积分:1
  • 冒泡排序算法
    排序算法中经典的冒泡排序算法。用冒泡排序法对任意输入的数由小到大进行排序,通过两个for循环实现冒泡排序的全过程,外层循环决定冒泡排序的趟数,内层决定每趟进行两两比较的次数。
    2022-01-25 15:57:59下载
    积分:1
  • C语言编写轻量级编译器代码
    C语言编写的一款轻量级编译器,代码很小。有学习价值。
    2022-02-27 04:19:49下载
    积分:1
  • hgfx1
    求两个数组的和差积商,其主要功能就是计算两个数组的和差积商(Find difference between two arrays and product providers)
    2011-09-07 17:10:54下载
    积分:1
  • SummaryDataGridViewSource
    是datagridview自动添加会总行 并跟随滚动条滚动(Is the datagridview will automatically add the head office and follow the scroll bar to scroll)
    2010-12-15 14:52:09下载
    积分:1
  • 217
    说明:  用c语言完成(2,1,7)卷积编码,viterbi解码(Complete with c language (2,1,7) convolutional coding, viterbi decoding)
    2010-04-28 22:11:44下载
    积分:1
  • upfile_2.4.3
    多图片上交过程,程序的主要功能就是图片上传。可以一次上传多个文件。速度也相当的快哦。 (hand in the picture)
    2013-05-31 08:35:19下载
    积分:1
  • RS485通讯_DMA收发数据
    说明:  基于STM32F407 MCU,对RS485进行通讯测试,DMA收发数据,经测试数据稳定,功能正常(Based on STM32F407 MCU, RS485 was tested for communication,DMA data receiving and receiving, the tested data was stable and the function was normal)
    2020-12-28 21:09:01下载
    积分:1
  • rc522
    说明:  本代码是用51单片机实现rc522芯片的功能源程序,本程序是做一个读卡器!!!(This code is a single chip with 51 source rc522 chip function, this program is to be a reader! ! !)
    2011-03-05 11:23:52下载
    积分:1
  • 696516资源总数
  • 106442会员总数
  • 11今日下载