- 博客(6)
- 收藏
- 关注
原创 2020-12-20
标题按键控制亮度#include <reg52.h>#include “./delay/delay.h”#define SEGPORT P0#define KEYPORT P1sbit seg_select = P2^1;sbit bit_select = P2^0;sbit beep = P2^7;//unsigned char seg_data[16]= {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,
2020-12-20 15:14:52 105
原创 2020-12-20
标题寻迹小车单片机C51代码#include <reg51.h>sbit IN1 = P1^2;sbit IN2 = P1^3;sbit IN3 = P1^4;sbit IN4 = P1^5;sbit ENA = P1^0;//左边两个电机的使能sbit ENB = P1^1;//右边两个电机的使能sbit lse1 = P3^0;//左边红外传感器的数据口sbit lse2 = P3^1;//右边红外传感器的数据口unsigned char zk
2020-12-20 15:13:20 197 1
原创 2020-12-20
stm32按键控制#include “system.h”#include “SysTick.h”#include “led.h”#include “beep.h”#include “key.h”int main(){u8 key,i=0;SysTick_Init(72);LED_Init();BEEP_Init();KEY_Init();while(1){ key=KEY_Scan(0); //扫描按键 switch(key) { case KEY_UP_PRES
2020-12-20 15:09:39 99
原创 2020-12-09
标题单片机电子钟按键可实现功能可以调时间,成一个电子表#include “reg52.h”typedef unsigned int u16;typedef unsigned char u8;sbit LSA=P2^2;sbit LSB=P2^3;sbit LSC=P2^4;sbit k1=P3^1;sbit k2=P3^0;sbit k3=P3^2;sbit k4=P3^3;u8 code smgduan[17]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x
2020-12-09 12:17:55 138 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人