1. 首页
  2. 数据库
  3. 其它
  4. arduino 自平衡小车

arduino 自平衡小车

上传者: 2021-01-16 14:09:18上传 PDF文件 31.15KB 热度 17次
MsTime2,霍尔编码器测速 100毫秒触发一次中断,打印出这100毫秒内,霍尔编码器测到的脉冲数。 代码如下: #include //TB6612引脚定义 const int right_R1=8; const int right_R2=12; const int PWM_R=10; const int left_L1=7; const int left_L2=6; const int PWM_L=9; const int PinA_left = 5; //定义检测左电机脉冲的引脚为D5 const int PinA_right = 4; //定义检测右电机脉冲
下载地址
用户评论