1. 首页
  2. 行业
  3. 互联网
  4. 电动牙刷原理图PCB源码资料下载.zip

电动牙刷原理图PCB源码资料下载.zip

上传者: 2021-04-16 13:17:32上传 ZIP文件 44.38KB 热度 10次
#include "main.h" void main(void) { SystemInit(); while(1) { BatteryVoltageWarning(); KeyScan(); switch (key_flag) { case 0: Led50 = 1;Led70 = 1;Led100 = 1; //档位指示灯全灭 MotorA = 1;MotorB = 1; //电机不转 break; case 1: Led50 = 0;Led70 = 1;Led100 = 1; //1挡指示灯亮 MotorA = 0;MotorB = 1; break; case 2: Led50 = 1;Led70 = 0;Led100 = 1; //2挡指示灯亮 break; case 3: Led50 = 1;Led70 = 1;Led100 = 0; //3挡指示灯亮 break; default: break; }
用户评论