基于CH32的全屋灯光智能控制系统源代码(项目分享-小白练手项目)
立即下载
资源介绍:
基于CH32的全屋灯光智能控制系统源代码(项目分享-小白练手项目)
#include "lcd.h"
#include "ch32v20x.h"
const u16 colors[21] = {
WHITE, BLACK, BLUE, BRED, GRED, GBLUE, RED,
MAGENTA, GREEN, CYAN, YELLOW, BROWN, BRRED, GRAY, DARKBLUE,
LIGHTBLUE, GRAYBLUE, LIGHTGREEN, LGRAY, LGRAYBLUE, LBBLUE
};
const int LED_LCD_COL[7] = {0, 18, 36, 54, 72, 90, 108};
const int LED_LIGHT_ROW[7] = {35, 51, 51, 51, 35, 51, 35};
u8 room_name[7][16] = {"客厅", "主卧室", "次卧室", "客卧室", "厨房", "卫生间", "玄关"};
const unsigned char BLE[1400] = { /* 0X10,0X10,0X00,0X14,0X00,0X23,0X01,0X1B, */
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X23,0XF7,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0X24,0X17,0X1C,0X17,0XF7,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0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x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x18,0x18,0x00,0x00},/*"!",1*/
{0x00,0x48,0x6C,0x24,0x12,0x00,0x00,
资源文件列表:
Peripheral.zip 大约有199个文件