基于单片机声光双控路灯仿真设计
作者:互联网
1467下载地址 https://docs.qq.com/doc/DWEpnR2pOWU91b3p4?pub=1&dver=2.1.0
#include <reg52.h> sbit guang = P0 ^ 2; sbit shen = P2 ^ 0; void delay( unsigned char a ) { while ( --a ) ; } void main() { unsigned char i = 0; unsigned char j = 0; unsigned char k = 0; while ( 1 ) { //没有光的情况下 if ( guang == 0) { //判断有无声音
标签:双控,guang,void,unsigned,char,单片机,while,sbit,声光 来源: https://www.cnblogs.com/cczero/p/14534117.html