基于单片机人体感应智能台灯设计
1460下载地址 https://docs.qq.com/doc/DWEpnR2pOWU91b3p4?pub=1&dver=2.1.0
#include <reg52.h> sbit key = P2^0; sbit led = P1^0; void delay_ms(unsigned int x); void setup(); void main() { setup(); while(1) { if(key==1) { led = 1; delay_ms(1000); led = 0; } } } void setup()