单片机 | 基于stc89c52的循迹小车+pwm
作品实现循迹开始。。。直角转弯。。。三叉线转弯。。。直线加速。。。代码实现#include <reg52.h> #define uint unsigned int #define uchar unsigned char #define fr 50 //频率50HZ sbit pwmout1 = P1 ^ 0; sbit pwmout2 = P1 ^ 1; sbit wela1 =
作品实现循迹开始。。。直角转弯。。。三叉线转弯。。。直线加速。。。代码实现#include <reg52.h> #define uint unsigned int #define uchar unsigned char #define fr 50 //频率50HZ sbit pwmout1 = P1 ^ 0; sbit pwmout2 = P1 ^ 1; sbit wela1 =
作品展示代码实现#include <reg52.h> #define uchar unsigned char #define uint unsigned int void delay(uint i); sbit z1 = P1 ^ 0; sbit z2 = P1 ^ 1; sbit y1 = P1 ^ 2; sbit y2 = P1 ^ 3; uint aa; sbit PWMOU