基于Esp8266的点阵时钟-Arduino中文社区 - Powered by Discuz! Archiver

zong0001 发表于 2019-3-20 20:52

基于Esp8266的点阵时钟

本帖最后由 zong0001 于 2019-3-23 21:53 编辑

芯片是ESP8266 12F 配合点阵单元板(64*32,单色),实现自动对时,天气预报,农历,提醒,远程控制等功能。
电路图:

PCB:


实际效果


多种显示方式自由配置,web页面设置,温度湿度曲线等等信息监控,适合放在机房

增加设备定时控制,可控制几十个设备的上千种功能,与原有物联网设备联网。



附源代码:因为是一边摸索这个点阵一边编写,功能是逐渐添加的,越来越多,所以有些冗余的代码或变量,也没有去掉。另外编程的习惯不是很好,可读性较差,希望谅解。

#define sn"1122334455"      //这个要和服务器接收进行匹配获取信息。是多用户设置,一个sn对应一个配置
#define Wifiname"********"   //无线用户名密码,后期要编写直连后配置wifi并保存到eeprom
#define Wifipassword"*******"

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include "uTimerLib.h"      //定时中断的库
//#include <DHT12.h>

ESP8266WiFiMulti WiFiMulti;
//DHT12 DHT;
volatile bool baoshi = 0;//整点报时
unsigned long baoshiMillis = 0;
uint8_t ledLine = 0;//扫描行数
uint8_t bell = {0,0};//现在、设定蜂鸣器
uint8_t webbell;   //同步蜂鸣器开关
#define DHT12pin 5    //D1接dht12数据
#define bellpin 4    //蜂鸣器接D2
unsigned int Temp;
unsigned int Hum;   //温度湿度
uint8_t pin = {3,1,0,16,2,14,12,13,15};   //直插引脚
//uint8_t pin = {12,14,0,2,16,1,3,15,13};   //排线插针引脚
#define banzinum 1 //板子级联数量
// Lab11 使用 74HC595 和三支腳位控制 8 顆 LED
// 接 74HC595 的 ST_CP (pin 12,latch pin)
#define latchPin pin
// 接 74HC595 的 SH_CP (pin 11, clock pin)
#define clockPinpin
// 接 74HC595 的 DS (pin 10)
#define dataPinpin   //上排
#define dataPin2pin//下排
#define enpin
#define la pin
#define lb pin
#define lc pin
#define ld pin
byte zm = {1,7,36,3,5,36,2,8,1,2,40,39,37,6,7,41};
byte datenow = {10,11,38,13,14,37,16,17,18,19,20,21,22,23,24,25};
byte zmnew = {1,2,10,3,4,10,5,6};
byte yinlihanzi = 0; //阴历汉字开始位置
byte infotime = 5;//信息显示秒数
byte webtime;
byte webdatebuff;
byte dingshikey = 0;    //定时显示字数
byte weberror = 0;//网络访问正常0,失败1
unsigned int tixingtime = 30;
byte hour = 0;
byte minute = 0;
byte second = 0;
unsigned int timenow = 0;
unsigned int timelist;
unsigned int httpkey = 0;
unsigned int readA0;//读取模拟量
byte week = 0;
byte logo{    //启动测试
    {
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0xFF,0xFB,0xC0},
{0x00,0x00,0x00,0x00,0x00,0xFB,0xFB,0xC0,0x00,0x00,0x00,0x00,0x00,0xFF,0x81,0xC0},
{0x00,0x00,0x00,0x00,0x07,0xFC,0x03,0xC0,0x00,0x00,0x00,0xFF,0xCF,0xB0,0x49,0xC0},
{0x00,0x01,0xFF,0xFF,0xFF,0xC0,0x9C,0xC0,0x00,0x07,0xBE,0x00,0x3C,0x01,0xBE,0xE0},
{0x00,0x0E,0x7C,0x00,0x00,0x03,0x73,0x60,0x00,0x1C,0xF8,0x00,0x06,0x02,0xE3,0xE0},
{0x00,0x35,0xD8,0x30,0x06,0x01,0xC1,0xE0,0x00,0x6F,0x98,0x10,0x03,0x05,0x80,0x40},
{0x00,0xDF,0x98,0x10,0x03,0x0F,0x80,0x00,0x00,0xF7,0x1C,0x30,0x00,0x0F,0x00,0x00},
{0x03,0x83,0x0E,0x38,0x01,0x1F,0x00,0x00,0x03,0xF6,0x06,0x3F,0x87,0x8E,0x00,0x00},
{0x03,0xFE,0x06,0x7F,0xFF,0xC7,0x00,0x00,0x03,0xFC,0x0C,0xFD,0xFC,0xF9,0x80,0x00},
{0x03,0xF0,0x1D,0xEC,0x00,0x3F,0xE0,0x00,0x02,0x00,0x3B,0x6C,0x00,0x07,0xE0,0x00},
{0x00,0x00,0x37,0x7E,0x00,0x07,0xE0,0x00,0x00,0x00,0x36,0x7F,0x80,0x0E,0xF0,0x00},
{0x00,0x00,0x1E,0x1F,0xE0,0x1E,0x70,0x00,0x00,0x00,0x1E,0x07,0xF0,0x3E,0x78,0x00},
{0x00,0x00,0x0E,0x01,0xD8,0xEC,0x38,0x00,0x00,0x00,0x0E,0x00,0xD8,0xEC,0x3C,0x00},
{0x00,0x00,0x0B,0x00,0x7C,0xF8,0x3E,0x00,0x00,0x00,0x0B,0x80,0x7C,0xF0,0x1E,0x00},
{0x00,0x00,0x0F,0xC0,0x3C,0x40,0x00,0x00,0x00,0x00,0x07,0xE0,0x00,0x00,0x00,0x00},/*"D:\zonghc\Pictures\1.bmp",0*/
    },
{

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xF0},
{0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xF0,0x00,0x00,0x00,0x00,0x07,0xFF,0xFE,0xF0},
{0x00,0x00,0x00,0x00,0x0F,0xFF,0x87,0xE0,0x00,0x00,0x01,0xFF,0xFF,0xFC,0x76,0xF0},
{0x00,0x01,0xFF,0xFF,0xFF,0xE1,0xFF,0xF0,0x00,0x07,0xFF,0x00,0x0C,0x03,0xFF,0xF8},
{0x00,0x0E,0xFC,0x00,0x01,0x87,0x71,0xD8,0x00,0x7D,0xEC,0x00,0x01,0x87,0xE0,0x78},
{0x00,0xFB,0x8C,0x00,0x01,0xC7,0xC0,0x78,0x00,0xF7,0x0C,0x06,0x00,0xC7,0xC0,0x38},
{0x01,0xCF,0x0C,0x0E,0x00,0x63,0x80,0x00,0x03,0xBE,0x0C,0x0C,0x00,0x63,0xC0,0x00},
{0x01,0xFE,0x0C,0x1F,0xC1,0xE3,0xFC,0x00,0x0F,0xF8,0x0C,0x3F,0xFF,0xF3,0xFC,0x00},
{0x1F,0xF0,0x1C,0xFF,0xFF,0xFD,0xFC,0x00,0x1F,0x80,0x7F,0xFC,0x00,0x1F,0xBC,0x00},
{0x00,0x00,0xFF,0x3C,0x00,0x07,0xF8,0x00,0x00,0x00,0xFC,0x3C,0x00,0x01,0xF8,0x00},
{0x00,0x00,0xF0,0x2C,0x00,0x01,0xF0,0x00,0x00,0x00,0xE0,0x3E,0x00,0x03,0xF8,0x00},
{0x00,0x01,0xE0,0x3F,0x00,0x03,0xF8,0x00,0x00,0x01,0xC0,0x1F,0x80,0x07,0xDC,0x00},
{0x00,0x01,0xC0,0x07,0xE0,0x06,0x1F,0x00,0x00,0x03,0xC0,0x01,0xE0,0x00,0x0F,0x80},
{0x00,0x03,0xE0,0x01,0xF0,0x00,0x0F,0xE0,0x00,0x01,0xE0,0x00,0xF0,0x00,0x07,0xE0},
{0x00,0x00,0xF0,0x00,0xF0,0x00,0x03,0xE0,0x00,0x00,0xF0,0x00,0x70,0x00,0x00,0x00},/*"2.bmp",0*/
} ,{
   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x7F,0xFB,0x80,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0x80},
{0x00,0x00,0x00,0x00,0x0F,0xCF,0xFF,0x80,0x00,0x00,0x00,0x00,0xCF,0xFF,0xFF,0x80},
{0x00,0x00,0x00,0x00,0xFF,0xFE,0x0F,0xC0,0x00,0x00,0x1F,0xFF,0xFF,0xE1,0xDB,0xC0},
{0x00,0x03,0xFF,0xFF,0xFF,0x07,0xFE,0xE0,0x00,0x07,0xF8,0x00,0x00,0x1E,0xFF,0xF0},
{0x00,0x0D,0xF0,0x00,0x0E,0x3F,0xC3,0xF0,0x00,0x1B,0xE0,0x08,0x0C,0x37,0x81,0xF0},
{0x00,0x3B,0x60,0x38,0x0E,0x1F,0x00,0xF0,0x00,0x76,0x60,0x70,0x07,0x1E,0x00,0x70},
{0x01,0xE6,0x60,0x60,0x03,0x1E,0x00,0x00,0x01,0xEE,0x71,0xF0,0x01,0x1E,0x00,0x00},
{0x01,0x9C,0x73,0xFE,0x03,0x9E,0x00,0x00,0x07,0xF8,0xEF,0xFF,0xFF,0xDF,0x80,0x00},
{0x07,0xF3,0xFF,0xC7,0xFF,0xEF,0xC0,0x00,0x07,0x87,0xFD,0x80,0x00,0x7F,0xE0,0x00},
{0x00,0x07,0xFF,0x00,0x00,0x3D,0xE0,0x00,0x00,0x07,0x9B,0x00,0x00,0x1E,0xE0,0x00},
{0x00,0x0F,0x1E,0x00,0x00,0x1E,0xE0,0x00,0x00,0x1E,0x0F,0x00,0x00,0x0F,0xF0,0x00},
{0x00,0x3C,0x07,0x00,0x00,0x0F,0xF0,0x00,0x00,0x3C,0x07,0x80,0x00,0x07,0xE0,0x00},
{0x00,0xF8,0x03,0xC0,0x00,0x03,0xE0,0x00,0x01,0xF8,0x01,0xF0,0x00,0x03,0xE0,0x00},
{0x01,0xF0,0x01,0xFC,0x00,0x01,0xF0,0x00,0x01,0xC0,0x00,0xFC,0x00,0x01,0xF8,0x00},
{0x01,0x80,0x00,0x7C,0x00,0x00,0xF8,0x00,0x01,0x80,0x00,0x7C,0x00,0x00,0xF8,0x00},/*"D:\zonghc\Pictures\3.bmp",0*/
    },
    {
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xC0},
{0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x07,0xCF,0xFF,0x80},
{0x00,0x00,0x00,0x00,0x0F,0xFF,0xCB,0xC0,0x00,0x00,0x00,0x00,0xFF,0xFC,0x4F,0xC0},
{0x00,0x03,0xFF,0xFF,0xFF,0xE3,0xDD,0xE0,0x00,0x07,0xFF,0xFF,0xFE,0x07,0xFF,0x60},
{0x00,0x1F,0xE0,0x00,0x00,0x1E,0xF7,0xF0,0x00,0x1B,0xC0,0x00,0x18,0x1D,0xC1,0xF0},
{0x00,0x33,0xC0,0x00,0x18,0x17,0x80,0xF0,0x00,0x67,0xC0,0x00,0x1C,0x67,0x00,0x70},
{0x0F,0xEF,0xC0,0x70,0x0E,0x76,0x00,0x00,0x0F,0xDF,0x80,0x60,0x06,0x36,0x00,0x00},
{0x1F,0xFD,0x81,0xC0,0x02,0x3C,0x00,0x00,0x1F,0xFB,0x87,0xF8,0x03,0x9C,0x00,0x00},
{0x3F,0xDF,0x7F,0xFF,0xFF,0xFE,0x00,0x00,0x38,0x3F,0xFC,0x1F,0xFF,0xFF,0x80,0x00},
{0x00,0x7F,0xE0,0x00,0x01,0xFF,0xE0,0x00,0x00,0x7F,0x80,0x00,0x00,0xE3,0xE0,0x00},
{0x00,0x7F,0x00,0x00,0x00,0xF1,0xF0,0x00,0x00,0xEE,0x00,0x00,0x00,0xF0,0xFC,0x00},
{0x01,0xFE,0x00,0x00,0x00,0xF0,0x7F,0x00,0x03,0xDC,0x00,0x00,0x00,0x70,0x3F,0x80},
{0x0F,0xFC,0x00,0x00,0x00,0x70,0x0F,0xE0,0x0F,0xA8,0x00,0x00,0x00,0x78,0x03,0xF0},
{0x1F,0x3C,0x00,0x00,0x00,0x38,0x01,0xF0,0x1C,0x3F,0x00,0x00,0x00,0x3E,0x00,0xF0},
{0x00,0x1F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x3F,0x00,0x00},/*"D:\zonghc\Pictures\4.bmp",0*/   
      },{

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x0F,0xFE,0xE0,0x00,0x00,0x00,0x00,0x03,0xFF,0xCF,0xE0},
{0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xE0},
{0x00,0x00,0x00,0x00,0xFF,0xFF,0x87,0xE0,0x00,0x00,0x1F,0xFF,0xFB,0xF8,0x37,0xF0},
{0x00,0x1F,0xFF,0xFF,0xFF,0xC0,0xFF,0xF0,0x00,0x3F,0xF0,0x00,0xFC,0x03,0xFF,0xB8},
{0x00,0x37,0xE0,0x00,0x00,0x07,0xE1,0xD8,0x00,0x6F,0xC0,0x00,0x0C,0x0F,0xC0,0xF8},
{0x00,0xEC,0xC0,0x00,0x0C,0x1F,0x80,0x78,0x03,0xDC,0xC0,0x30,0x0E,0x1B,0x00,0x38},
{0x03,0xB8,0xC0,0x70,0x06,0x1B,0x00,0x00,0x0F,0xF8,0xC0,0xE0,0x03,0x9F,0x00,0x00},
{0x0F,0xF1,0xC7,0xFC,0x01,0xCE,0x00,0x00,0x0F,0xE7,0xBF,0xFF,0xFF,0xEC,0x00,0x00},
{0x1F,0x9F,0xFE,0x0F,0xFF,0xF6,0x00,0x00,0x1C,0x1F,0xF0,0x01,0xFD,0xFF,0x00,0x00},
{0x18,0x3F,0x00,0x00,0x03,0xDF,0x80,0x00,0x00,0x3E,0x00,0x00,0x03,0xC7,0xC0,0x00},
{0x00,0x7E,0x00,0x00,0x03,0xC3,0xC0,0x00,0x00,0xFC,0x00,0x00,0x03,0x83,0xE0,0x00},
{0x01,0xFC,0x00,0x00,0x03,0x81,0xF0,0x00,0x03,0xF8,0x00,0x00,0x07,0x80,0xF0,0x00},
{0x03,0xF8,0x00,0x00,0x07,0x80,0x78,0x00,0x03,0xF0,0x00,0x00,0x07,0x80,0x7C,0x00},
{0x03,0xC0,0x00,0x00,0x07,0x80,0x3E,0x00,0x01,0x80,0x00,0x00,0x07,0xC0,0x1F,0x00},
{0x00,0x00,0x00,0x00,0x03,0xE0,0x1F,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x0F,0x00},/*"D:\zonghc\Pictures\5.bmp",0*/      
      
      },{

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFD,0xC0},
{0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x3E,0xFF,0xFF,0xC0},
{0x00,0x00,0x00,0x03,0xFF,0xFF,0xFD,0xC0,0x00,0x01,0xFF,0xFF,0xFF,0xE0,0xEF,0xC0},
{0x00,0x07,0xFF,0xFF,0xFF,0x03,0xFB,0xC0,0x00,0x0F,0xF0,0x27,0xF8,0x07,0xFE,0xE0},
{0x00,0x1F,0xE0,0x38,0x00,0x0F,0xEF,0xE0,0x00,0x7B,0xE0,0x18,0x00,0x1F,0x87,0xE0},
{0x00,0x77,0xE0,0x38,0x00,0x1F,0x01,0xE0,0x03,0xE6,0xE0,0xF0,0x00,0x36,0x01,0xE0},
{0x03,0xDE,0x61,0xE0,0x00,0x3C,0x00,0xC0,0x03,0x3F,0xF1,0xE0,0x0C,0x1C,0x00,0x00},
{0x07,0xFF,0xF7,0xF8,0x06,0x3C,0x00,0x00,0x07,0xFE,0xBF,0xFF,0xFF,0x38,0x00,0x00},
{0x07,0x1F,0xFF,0x1F,0xFF,0xF0,0x00,0x00,0x04,0x1F,0xF8,0x07,0xFF,0xF8,0x00,0x00},
{0x00,0x1F,0x00,0x00,0x1F,0x78,0x00,0x00,0x00,0x1F,0x00,0x00,0x1E,0x3C,0x00,0x00},
{0x00,0x3F,0x00,0x00,0x3C,0x3E,0x00,0x00,0x00,0x3F,0x00,0x00,0x3C,0x1E,0x00,0x00},
{0x00,0xFE,0x00,0x00,0x78,0x1E,0x00,0x00,0x01,0xFE,0x00,0x00,0x78,0x0F,0x00,0x00},
{0x01,0xFC,0x00,0x00,0xF0,0x07,0x00,0x00,0x01,0xF8,0x00,0x01,0xE0,0x07,0x80,0x00},
{0x01,0xD8,0x00,0x01,0xF0,0x03,0xC0,0x00,0x00,0x00,0x00,0x01,0xF8,0x03,0xE0,0x00},
{0x00,0x00,0x00,0x00,0xF8,0x03,0xF0,0x00,0x00,0x00,0x00,0x00,0xF8,0x01,0xF0,0x00},/*"D:\zonghc\Pictures\6.bmp",0*/         
         
          },{
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFC,0x00},
{0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xE0},
{0x00,0x00,0x00,0x00,0x03,0xEF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xDF,0xE5,0xE0},
{0x00,0x00,0x00,0x7E,0x1F,0xFE,0x37,0xE0,0x00,0x00,0x01,0xFF,0xFF,0xF0,0xFD,0xE0},
{0x00,0x01,0xFF,0xC3,0xFF,0xC3,0xBF,0x70,0x00,0x03,0xFE,0x06,0x00,0x07,0x77,0xF0},
{0x00,0x07,0x3C,0x07,0x00,0x0E,0xE1,0xF0,0x00,0x0E,0x7C,0x07,0x00,0x0D,0xC0,0xF0},
{0x00,0x0D,0xE8,0x0E,0x00,0x0B,0x80,0x70,0x00,0x7F,0xCC,0x0C,0x00,0x07,0x00,0x00},
{0x03,0xFF,0xCE,0x0C,0x00,0x07,0x00,0x00,0x07,0xFF,0x87,0x0F,0x00,0xC7,0x00,0x00},
{0x07,0xFF,0x03,0x9F,0xE0,0xCF,0x00,0x00,0x0F,0xFE,0x0F,0xBB,0xFF,0xCE,0x00,0x00},
{0x0D,0xF0,0x3F,0xF0,0xFF,0xFC,0x00,0x00,0x08,0x80,0x3F,0xE0,0x07,0xFE,0x00,0x00},
{0x00,0x00,0x1F,0x80,0x01,0xFE,0x00,0x00,0x00,0x00,0x1F,0x00,0x01,0xFE,0x00,0x00},
{0x00,0x00,0x1F,0x80,0x07,0xFE,0x00,0x00,0x00,0x00,0x07,0xC0,0x0F,0xFE,0x00,0x00},
{0x00,0x00,0x07,0xE0,0x1F,0xFC,0x00,0x00,0x00,0x00,0x07,0xF0,0x1F,0xE0,0x00,0x00},
{0x00,0x00,0x07,0xF0,0x17,0x80,0x00,0x00,0x00,0x00,0x07,0xF0,0x0F,0x00,0x00,0x00},
{0x00,0x00,0x03,0xF8,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x1F,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x00,0x00},/*"D:\zonghc\Pictures\7.bmp",0*/            
            
            },
{

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x03,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xC0},
{0x00,0x00,0x00,0x00,0x07,0xD3,0xFF,0xC0,0x00,0x00,0x00,0x00,0x7F,0xCF,0xFF,0xC0},
{0x00,0x00,0x00,0x00,0x7C,0x3F,0xCB,0x80,0x00,0x00,0x00,0x00,0x3D,0xFC,0x6F,0xC0},
{0x00,0x00,0x01,0xFF,0xFF,0xE3,0xFB,0xC0,0x00,0x00,0x07,0xFF,0xFF,0x07,0x7E,0xC0},
{0x00,0x01,0xFF,0x00,0x7C,0x0E,0xEF,0xE0,0x00,0x07,0xFE,0x00,0x00,0x1D,0xC3,0xE0},
{0x00,0x0F,0x7C,0x04,0x00,0x1B,0x81,0xE0,0x00,0x3C,0xFC,0x06,0x00,0x03,0x01,0xE0},
{0x00,0xF9,0xCC,0x03,0x00,0x03,0x00,0x00,0x03,0xEF,0x8E,0x03,0x00,0x03,0x00,0x00},
{0x07,0xDF,0x0F,0x83,0x00,0x9B,0x00,0x00,0x07,0xFE,0x07,0xC7,0x81,0x9B,0x00,0x00},
{0x0F,0xFC,0x03,0xC7,0xFF,0x9F,0x00,0x00,0x0F,0xF0,0x01,0xEF,0xFF,0xDF,0xE0,0x00},
{0x08,0x00,0x07,0xFC,0x3F,0xDF,0xE0,0x00,0x00,0x00,0x07,0x78,0x00,0xFF,0xE0,0x00},
{0x00,0x00,0x0F,0xF0,0x00,0xF1,0xC0,0x00,0x00,0x00,0x07,0xF0,0x00,0x73,0x80,0x00},
{0x00,0x00,0x01,0xF8,0x00,0xF7,0x80,0x00,0x00,0x00,0x00,0xFE,0x01,0xFF,0x80,0x00},
{0x00,0x00,0x00,0x3F,0x1F,0xFF,0x00,0x00,0x00,0x00,0x00,0x3F,0xBF,0xBE,0x00,0x00},
{0x00,0x00,0x00,0x3F,0xFF,0x38,0x00,0x00,0x00,0x00,0x00,0x3F,0xFE,0x20,0x00,0x00},
{0x00,0x00,0x00,0x1B,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x00,0x00,0x00},/*"D:\zonghc\Pictures\8.bmp",0*/
}
    };
byte allled = {
    {{0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0}},
    {{0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0}},
    {{0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0}},
    {{0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0}}
    };
unsigned int refmax = 30;
unsigned intwebdelay = 8;
unsigned int refsec =0;
unsigned long previousMillis = 0;
unsigned long interval = 997;
unsigned long currentMillis;
unsigned int mm =0;
int outtime = 0;
unsigned int showmode = 8;   //
uint8_t showled = {1,2,3,4,5,6,7,8,9,15,32,32};
int temp;
int yubao ;//天气预报
byte hztq = {16,19,0,1,17,19,2,3,18,19,4,5,19};//三天天气汉字
byte hztx = {};//汉字提醒
byte wendu ={};//温度显示字符
   uint8_t hz = {
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",1*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",2*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",3*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",4*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",5*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",6*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",7*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",8*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",9*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",10*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",11*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",12*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",13*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",14*/   
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",15*/   
{0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x18,0x28,0x10,0x28,0x10,0x24,0x14,0x52,0x38,0x43,0x10,0x88,0x10,0x38,0x28,0x08,0x28,0x08,0x24,0x10,0x42,0x00,0x00,0x00,0x00},/*"今",16*/
{0x00,0x00,0x00,0x00,0x0E,0x00,0x2A,0x18,0x7A,0x10,0x6E,0x10,0x6A,0x14,0x6A,0x38,0x6E,0x10,0x6A,0x10,0x12,0x28,0x12,0x28,0x16,0x24,0x22,0x42,0x22,0x00,0x00,0x00},/*"明",17*/
{0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x18,0x30,0x10,0x20,0x10,0x26,0x14,0x38,0x38,0x20,0x10,0x44,0x10,0x7A,0x28,0x64,0x28,0x64,0x24,0x9C,0x42,0x00,0x00,0x00,0x00},/*"后",18*/
{0x00,0x00,0x00,0x00,0x10,0x00,0x7E,0x18,0x18,0x10,0x24,0x10,0xC3,0x14,0x00,0x38,0x3E,0x10,0x40,0x10,0x7E,0x28,0x7E,0x28,0xA2,0x24,0xBE,0x42,0x00,0x00,0x00,0x00},/*"大",19*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x04,0x00,0x04,0x00,0x05,0x80,0x1E,0x00,0x04,0x00,0x04,0x00,0x0A,0x00,0x09,0x00,0x10,0x80,0x20,0xE0,0x00,0x00,0x00,0x00},/*"天",20*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",21*/   
      };
   byte smalldigital{

{0x00,0x00,0x00,0x06,0x09,0x09,0x09,0x06},/*"0",0*/

{0x00,0x00,0x00,0x02,0x0E,0x02,0x02,0x02},/*"1",1*/

{0x00,0x00,0x00,0x07,0x09,0x02,0x04,0x0F},/*"2",2*/

{0x00,0x00,0x00,0x0F,0x01,0x07,0x01,0x0E},/*"3",3*/

{0x00,0x00,0x00,0x03,0x05,0x0D,0x0F,0x01},/*"4",4*/

{0x00,0x00,0x00,0x07,0x08,0x0F,0x01,0x0E},/*"5",5*/

{0x00,0x00,0x00,0x07,0x08,0x0F,0x09,0x06},/*"6",6*/

{0x00,0x00,0x00,0x0F,0x02,0x02,0x04,0x04},/*"7",7*/

{0x00,0x00,0x00,0x0F,0x09,0x06,0x09,0x0F},/*"8",8*/

{0x00,0x00,0x00,0x06,0x09,0x0F,0x01,0x0E},/*"9",9*/



      
      };
byte newzi = {

{0x00,0x00,0x00,0x1E,0x33,0x61,0x61,0x61,
0x61,0x61,0x33,0x1E,0x00,0x00,0x00,0x00},/*"0",0*/

{0x00,0x00,0x00,0x0C,0x3C,0x0C,0x0C,0x0C,
0x0C,0x0C,0x0C,0x3F,0x00,0x00,0x00,0x00},/*"1",1*/

{0x00,0x00,0x00,0x3E,0x47,0x63,0x63,0x06,
0x38,0x41,0x7F,0x4E,0x00,0x00,0x00,0x00},/*"2",2*/

{0x00,0x00,0x00,0x3E,0x63,0x63,0x03,0x1C,
0x03,0x63,0x43,0x3E,0x00,0x00,0x00,0x00},/*"3",3*/

{0x00,0x00,0x00,0x06,0x0E,0x0E,0x16,0x26,
0x66,0x7F,0x06,0x1F,0x00,0x00,0x00,0x00},/*"4",4*/

{0x00,0x00,0x00,0x7F,0x40,0x7C,0x46,0x03,
0x63,0x63,0x46,0x3C,0x00,0x00,0x00,0x00},/*"5",5*/

{0x00,0x00,0x00,0x1E,0x33,0x63,0x60,0x7E,
0x63,0x63,0x23,0x1E,0x00,0x00,0x00,0x00},/*"6",6*/

{0x00,0x00,0x00,0x59,0x7F,0x42,0x44,0x0C,
0x08,0x18,0x18,0x18,0x00,0x00,0x00,0x00},/*"7",7*/

{0x00,0x00,0x00,0x3E,0x63,0x63,0x72,0x1E,
0x27,0x63,0x63,0x3E,0x00,0x00,0x00,0x00},/*"8",8*/

{0x00,0x00,0x00,0x3C,0x62,0x63,0x63,0x3F,
0x03,0x33,0x36,0x1C,0x00,0x00,0x00,0x00},/*"9",9*/

{0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x00,
0x00,0x08,0x08,0x00,0x00,0x00,0x00,0x00},/*":",10*/

};
const byte hanzi[]={
{0x00,0x10,0x1F,0xF8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10,0x00,0x00} ,//日
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} ,//一
{0x00,0x00,0x00,0x00,0x00,0x10,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00} ,//二
{0x00,0x00,0x00,0x08,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFF,0xFE,0x00,0x00,0x00,0x00} ,//三
{0x00,0x00,0x00,0x04,0x7F,0xFE,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x3C,0x48,0x04,0x50,0x04,0x40,0x04,0x7F,0xFC,0x40,0x04,0x00,0x00} ,//四
{0x00,0x00,0x00,0x08,0x7F,0xFC,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x10,0x3F,0xFC,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x10,0x08,0x10,0x08,0x14,0xFF,0xFE,0x00,0x00} ,//五
{0x00,0x00,0x04,0x00,0x02,0x00,0x03,0x00,0x01,0x04,0xFF,0xFE,0x00,0x00,0x00,0x00,0x04,0x40,0x0C,0x20,0x08,0x10,0x10,0x18,0x10,0x0C,0x20,0x0C,0x40,0x04,0x00,0x00} ,//六
{0x00,0x08,0x3F,0xFC,0x20,0x08,0x3F,0xF8,0x20,0x08,0x3F,0xF8,0x01,0x00,0x21,0x08,0x3F,0xFC,0x21,0x00,0x41,0x10,0xBF,0xF8,0x01,0x00,0x01,0x04,0xFF,0xFE,0x00,0x00} ,//星
{0x22,0x04,0x22,0x7E,0x22,0x44,0x7F,0x44,0x22,0x44,0x3E,0x7C,0x22,0x44,0x3E,0x44,0x22,0x44,0x22,0x7C,0xFF,0xC4,0x00,0x44,0x24,0x44,0x22,0x84,0x41,0x14,0x82,0x08} ,//期
};
const byte char57 = {
0x0E,0x11,0x13,0x15,0x19,0x11,0x0E,0x00,//’0’   0
0x00,0x04,0x0C,0x04,0x04,0x04,0x0E,0x00,//’1’   1
0x0E,0x11,0x01,0x02,0x04,0x08,0x1F,0x00,//’2’   2
0x1F,0x02,0x04,0x02,0x01,0x11,0x0E,0x00,//’3’   3
0x02,0x06,0x0A,0x12,0x1F,0x02,0x02,0x00,//’4’   4   
0x1F,0x10,0x1E,0x01,0x01,0x11,0x0E,0x00,//’5’   5
0x06,0x08,0x10,0x1E,0x11,0x11,0x0E,0x00,//’6’   6
0x1F,0x01,0x02,0x04,0x08,0x08,0x08,0x00,//’7’   7
0x0E,0x11,0x11,0x0E,0x11,0x11,0x0E,0x00,//’8’   8
0x0E,0x11,0x11,0x0F,0x01,0x02,0x0C,0x00,//’9’   9

0x0E,0x11,0x11,0x11,0x1F,0x11,0x11,0x00,//’A’   10
0x1E,0x11,0x11,0x1E,0x11,0x11,0x1E,0x00,//’B’11
0x0E,0x11,0x10,0x10,0x10,0x11,0x0E,0x00,//’C’12
0x1C,0x12,0x11,0x11,0x11,0x12,0x1C,0x00,//’D’13
0x1F,0x10,0x10,0x1E,0x10,0x10,0x1F,0x00,//’E’   14
0x1F,0x10,0x10,0x1E,0x10,0x10,0x10,0x00,//’F’   15
0x0E,0x11,0x10,0x17,0x11,0x11,0x0F,0x00,//’G’   16
0x11,0x11,0x11,0x1F,0x11,0x11,0x11,0x00,//’H’   17
0x0E,0x04,0x04,0x04,0x04,0x04,0x0E,0x00,//’I’   18
0x07,0x02,0x02,0x02,0x02,0x12,0x0C,0x00,//’J’   19
0x11,0x12,0x14,0x18,0x14,0x12,0x11,0x00,//’K’   20
0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x00,//’L’   21
0x11,0x1B,0x15,0x15,0x11,0x11,0x11,0x00,//’M’   22
0x11,0x11,0x19,0x15,0x13,0x11,0x11,0x00,//’N’   23
0x0E,0x11,0x11,0x11,0x11,0x11,0x0E,0x00,//’O’   24
0x1E,0x11,0x11,0x1E,0x10,0x10,0x10,0x00,//’P’   25
0x0E,0x11,0x11,0x11,0x15,0x12,0x0D,0x00,//’Q’   26
0x1E,0x11,0x11,0x1E,0x14,0x12,0x11,0x00,//’R’   27
0x0F,0x10,0x10,0x0E,0x01,0x01,0x1E,0x00,//’S’   28
0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//’T’    29
0x11,0x11,0x11,0x11,0x11,0x11,0x0E,0x00,//’U’    30
0x11,0x11,0x11,0x11,0x11,0x0A,0x04,0x00,//’V’    31
0x11,0x11,0x11,0x15,0x15,0x15,0x0E,0x00,//’W’    32
0x11,0x11,0x0A,0x04,0x0A,0x11,0x11,0x00,//’X’    33
0x11,0x11,0x11,0x0A,0x04,0x04,0x04,0x00,//’Y’    34
0x1F,0x01,0x02,0x04,0x08,0x10,0x1F,0x00,//’Z’    35

0x00,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00,//’a’    36
0x10,0x10,0x16,0x19,0x11,0x11,0x1E,0x00,//’b’    37
0x00,0x00,0x0E,0x10,0x10,0x11,0x0E,0x00,//’c’    38
0x01,0x01,0x0D,0x13,0x11,0x11,0x0F,0x00,//’d’    39
0x00,0x00,0x0E,0x11,0x1F,0x10,0x0E,0x00,//’e’    40
0x00,0x06,0x09,0x08,0x1C,0x08,0x08,0x00,//’f’    41
0x10,0x10,0x16,0x19,0x11,0x11,0x11,0x00,//’h’   42
0x04,0x00,0x0C,0x04,0x04,0x04,0x0E,0x00,//’i’   43
0x02,0x00,0x06,0x02,0x02,0x12,0x0C,0x00,//’j’   44
0x08,0x08,0x09,0x0A,0x0C,0x0A,0x09,0x00,//’k’    45
0x0C,0x04,0x04,0x04,0x04,0x04,0x0E,0x00,//’l’   46
0x00,0x00,0x1E,0x15,0x15,0x11,0x11,0x00,//’m’    47
0x00,0x00,0x16,0x19,0x11,0x11,0x11,0x00,//’n’   48
0x00,0x00,0x0E,0x11,0x11,0x11,0x0E,0x00,//’o’    49
0x00,0x00,0x1E,0x11,0x1E,0x10,0x10,0x00,//’p’    50
0x00,0x00,0x0D,0x13,0x0F,0x01,0x01,0x00,//’q ’    51
0x00,0x00,0x16,0x19,0x10,0x10,0x10,0x00,//’r’   52
0x00,0x00,0x0E,0x10,0x0E,0x01,0x0E,0x00,//’s’   53
0x00,0x08,0x08,0x1C,0x08,0x09,0x06,0x00,//’t ’   54
0x00,0x00,0x11,0x11,0x11,0x13,0x0D,0x00,//’u’   55
0x00,0x00,0x11,0x11,0x11,0x0A,0x04,0x00,//’v’   56
0x00,0x00,0x11,0x11,0x15,0x15,0x0A,0x00,//’w’   57
0x00,0x00,0x11,0x0A,0x04,0x0A,0x11,0x00,//’x’   58
0x00,0x00,0x11,0x11,0x0F,0x01,0x0E,0x00,//’y’      59
0x00,0x00,0x1F,0x02,0x04,0x08,0x1F,0x00,//’z’      60

};
uint8_t buff;
uint8_t buff2;
uint8_t R1;
uint8_t R2;
uint8_t su = {0,1,2,3,4,5,6,7,8,9};
const byte zimu=
{
   /* {0x1C,0x22,0x22,0x22,0x22,0x22,0x22,0x1C},//0
    {0x08,0x18,0x08,0x08,0x08,0x08,0x08,0x1C},//1
    {0x1C,0x22,0x02,0x02,0x1C,0x20,0x20,0x3E},//2
    {0x1C,0x22,0x02,0x1C,0x02,0x02,0x22,0x1C},//3
    {0x08,0x18,0x28,0x48,0x7C,0x08,0x08,0x08},//4
    {0x3E,0x20,0x20,0x3E,0x02,0x02,0x22,0x1C},//5
    {0x1C,0x22,0x20,0x3C,0x22,0x22,0x22,0x1C},//6
    {0x3E,0x02,0x04,0x08,0x10,0x10,0x10,0x10},//7
    {0x1C,0x22,0x22,0x1C,0x22,0x22,0x22,0x1C},//8
    {0x1C,0x22,0x22,0x22,0x1E,0x02,0x22,0x1C},//9
*/

0x00,0x0E,0x11,0x13,0x15,0x19,0x11,0x0E,//’0’   0
0x00,0x04,0x0C,0x04,0x04,0x04,0x04,0x0E,//’1’   1
0x00,0x0E,0x11,0x01,0x02,0x04,0x08,0x1F,//’2’   2
0x00,0x1F,0x02,0x04,0x02,0x01,0x11,0x0E,//’3’   3
0x00,0x02,0x06,0x0A,0x12,0x1F,0x02,0x02,//’4’   4   
0x00,0x1F,0x10,0x1E,0x01,0x01,0x11,0x0E,//’5’   5
0x00,0x06,0x08,0x10,0x1E,0x11,0x11,0x0E,//’6’   6
0x00,0x1F,0x01,0x02,0x04,0x08,0x08,0x08,//’7’   7
0x00,0x0E,0x11,0x11,0x0E,0x11,0x11,0x0E,//’8’   8
0x00,0x0E,0x11,0x11,0x0F,0x01,0x02,0x0C,//’9’   9

    {0x00,0x1C,0x22,0x22,0x22,0x3E,0x22,0x22},//A10
    {0x00,0x3C,0x22,0x22,0x3E,0x22,0x22,0x3C},//B11
    {0x00,0x1C,0x22,0x20,0x20,0x20,0x22,0x1C},//C12
    {0x00,0x3C,0x22,0x22,0x22,0x22,0x22,0x3C},//D13
    {0x00,0x3E,0x20,0x20,0x3E,0x20,0x20,0x3E},//E14
    {0x00,0x3E,0x20,0x20,0x3E,0x20,0x20,0x20},//F15
    {0x00,0x1C,0x22,0x20,0x3E,0x22,0x22,0x1C},//G16
    {0x00,0x22,0x22,0x22,0x3E,0x22,0x22,0x22},//H17
    {0x00,0x1C,0x08,0x08,0x08,0x08,0x08,0x1C},//I18
    {0x00,0x3E,0x08,0x08,0x08,0x08,0x28,0x18},//J19
    {0x00,0x20,0x2C,0x30,0x20,0x30,0x2C,0x20},//K20
    {0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x3E},//L21
    {0x00,0x42,0x66,0x5A,0x42,0x42,0x42,0x42},//M22
    {0x00,0x00,0x2C,0x32,0x22,0x22,0x22,0x22},//n23
    {0x00,0x1C,0x22,0x22,0x22,0x22,0x22,0x1C},//O24
    {0x00,0x3C,0x22,0x22,0x3C,0x20,0x20,0x20},//P25
    {0x00,0x1C,0x22,0x22,0x22,0x2A,0x26,0x1F},//Q26
    {0x00,0x38,0x24,0x24,0x38,0x30,0x28,0x24},//R27
    {0x00,0x1C,0x22,0x20,0x1C,0x02,0x22,0x1C},//S28
    {0x00,0x3E,0x08,0x08,0x08,0x08,0x08,0x08},//T29
    {0x00,0x42,0x42,0x42,0x42,0x42,0x42,0x3C},//U30
    {0x00,0x22,0x22,0x22,0x14,0x14,0x08,0x00},//V31
    {0x00,0x41,0x41,0x49,0x55,0x55,0x63,0x41},//W32
    {0x00,0x00,0x42,0x24,0x18,0x18,0x24,0x42},//X33
    {0x00,0x22,0x22,0x14,0x08,0x10,0x20,0x00},//Y34
    {0x00,0x3E,0x02,0x04,0x08,0x10,0x20,0x3E},//Z35
    {0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x00},//冒号36
    {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//空白37
    {0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00},//横道38
    {0x00,0x00,0x13,0x05,0x08,0x08,0x09,0x06},//39自定义字符摄氏度
    {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00},//40小数点
    {0x00,0x18,0x19,0x02,0x04,0x08,0x13,0x03},//41%
    {0x00,0x00,0x00,0x08,0x15,0x02,0x00,0x00},//曲线42
    {0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00},//负号43
    {0x00,0x00,0x70,0x88,0x07,0x00,0x00,0x00},//波浪线44
};
const byte weekdata{
{0x00,0x00,0x00,0x00,0x03,0xF0,0x02,0x10,0x03,0xF0,0x02,0x10,0x03,0xF0,0x00,0x00},/*"日",0*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF8,0x00,0x00,0x00,0x00,0x00,0x00},/*"一",1*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,0x07,0xF8,0x00,0x00},/*"二",2*/

{0x00,0x00,0x00,0x00,0x03,0xF0,0x00,0x00,0x03,0xF0,0x00,0x00,0x07,0xF8,0x00,0x00},/*"三",3*/

{0x00,0x00,0x00,0x00,0x07,0xF8,0x05,0x48,0x05,0x58,0x06,0x28,0x07,0xF8,0x00,0x00},/*"四",4*/

{0x00,0x00,0x00,0x00,0x07,0xF8,0x00,0x80,0x03,0xF0,0x01,0x10,0x07,0xF8,0x00,0x00},/*"五",5*/

{0x00,0x00,0x00,0x00,0x00,0x80,0x07,0xF8,0x01,0x20,0x02,0x10,0x04,0x18,0x00,0x00},/*"六",6*/


};
byte verybigdigital = {1,2,3,4};
byte verybig{
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x0E,0x70,0x1E,0x70,0x1C,0x78,0x3C,0x38,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x7C,0x3C},
{0x7C,0x3C,0x7C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x1C,0x78,0x1E,0x78,0x0E,0x70,0x07,0xE0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00},/*"0",0*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x03,0xE0,0x1F,0xE0,0x07,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0},
{0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x07,0xF0,0x1F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"1",1*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x0F,0xF0,0x18,0x78,0x38,0x7C,0x3C,0x7C,0x3E,0x7C,0x3E,0x7C,0x3E,0x7C,0x3C,0x7C,0x00,0x78,0x00,0xF8,0x00,0xF0},
{0x01,0xE0,0x03,0xC0,0x03,0x00,0x06,0x00,0x04,0x02,0x08,0x06,0x18,0x04,0x10,0x1C,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"2",2*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x18,0xF8,0x38,0x78,0x3C,0x7C,0x3E,0x7C,0x3E,0x7C,0x1E,0x7C,0x0C,0x7C,0x00,0x78,0x00,0xF8,0x0F,0xE0},
{0x0F,0xF0,0x00,0xF8,0x00,0x7C,0x00,0x7C,0x18,0x3E,0x3E,0x3E,0x3E,0x3E,0x7E,0x3E,0x3C,0x7C,0x38,0x7C,0x18,0x78,0x0F,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"3",3*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x78,0x00,0x78,0x00,0xF8,0x00,0xF8,0x01,0xF8,0x01,0xF8,0x03,0xF8,0x02,0xF8,0x04,0xF8,0x04,0xF8},
{0x08,0xF8,0x08,0xF8,0x10,0xF8,0x10,0xF8,0x20,0xF8,0x3F,0xFE,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x01,0xF8,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"4",4*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0x1F,0xF8,0x1F,0xF8,0x1F,0xF8,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x17,0xE0,0x1C,0xF8},
{0x10,0x78,0x00,0x7C,0x00,0x7C,0x00,0x3C,0x08,0x3E,0x3C,0x3E,0x3E,0x3C,0x3E,0x7C,0x3C,0x7C,0x38,0x78,0x18,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"5",5*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xF0,0x0F,0x38,0x0E,0x38,0x1E,0x7C,0x1E,0x7C,0x3C,0x78,0x3C,0x30,0x3C,0x00,0x3C,0x00,0x7C,0xC0,0x7F,0xF0},
{0x7C,0x78,0x7C,0x78,0x7C,0x7C,0x7C,0x7C,0x3C,0x7C,0x3C,0x7C,0x3C,0x7C,0x3C,0x7C,0x1C,0x7C,0x1C,0x78,0x0E,0x70,0x07,0xE0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00},/*"6",6*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFE,0x3F,0xFE,0x3F,0xFE,0x3F,0xFC,0x38,0x08,0x30,0x18,0x20,0x30,0x20,0x30,0x00,0x70,0x00,0x60,0x00,0xE0},
{0x00,0xE0,0x01,0xE0,0x01,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x03,0xE0,0x07,0xE0,0x07,0xE0,0x03,0xE0,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"7",7*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x1C,0x38,0x3C,0x1C,0x38,0x1C,0x38,0x1C,0x3C,0x1C,0x7C,0x1C,0x3E,0x18,0x3F,0x38,0x1F,0xF0,0x0F,0xE0},
{0x07,0xF0,0x07,0xF8,0x0D,0xFC,0x18,0xFC,0x38,0x3E,0x70,0x1E,0x70,0x1E,0x70,0x1E,0x78,0x1E,0x38,0x1C,0x1C,0x3C,0x0F,0xF0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00},/*"8",8*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x1E,0x70,0x3E,0x70,0x3E,0x78,0x3C,0x78,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x3C,0x7C,0x3C,0x7C},
{0x3E,0x7C,0x1E,0x7C,0x0F,0xFC,0x00,0x7C,0x00,0x7C,0x18,0x7C,0x3C,0x78,0x3E,0x78,0x3C,0x70,0x38,0xF0,0x18,0xE0,0x0F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"9",9*/
};

void setup() {
// Wire.begin(5, 4); /* join i2c bus with SDA=D1 and SCL=D2 of NodeMCU */
// 將 latchPin, clockPin, dataPin 設置為輸出
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(dataPin2, OUTPUT);
pinMode(en,OUTPUT);
pinMode(la,OUTPUT);
pinMode(lb,OUTPUT);
pinMode(lc,OUTPUT);
pinMode(ld,OUTPUT);
pinMode(A0,INPUT);   //光敏接口
pinMode(bellpin,OUTPUT);
digitalWrite(bellpin,LOW);
digitalWrite(en,LOW);
//Serial.begin(115200);
WiFiMulti.addAP(Wifiname, Wifipassword);
for (int i=0;i<10;i++){ //增加小数点
smalldigital = smalldigital | 0x20;
}
for (int i=0;i<11;i++){ // 大数字向下移动
      for(int j=0;j<14;j++){
      newzi = newzi;
      }
}

    TimerLib.setInterval_us(toled, 1000);

}
void loop() {
   currentMillis = millis();
   mm = currentMillis - previousMillis;
   if(currentMillis - previousMillis >= interval) {
    int ot = currentMillis - previousMillis - 1000;
    outtime = outtime + ot;
    if (outtime > 1000){
      TimingISR();
      outtime = outtime - 1000;
      }
   
   
   previousMillis = currentMillis;
   refsec++;
   TimingISR();
   if (refsec%30 ==0) //30秒采集一次温度
      wenshidu();
//    Serial.println(sn);
}
if ((refsec > refmax)){
    if((WiFiMulti.run() == WL_CONNECTED)) {
       tohttps();
    }else{
      refmax = 30;
      }
   
      refsec =0;
    }/*
*/
    if(dingshikey >0){
      showmode =10;
      webdelay = 100;
      refmax = tixingtime;//报时30秒
          //testbell(mm/4%2);
      bell = (mm/125%2) *(second%2); //每秒4次
}else{
   if (baoshi ==1){   //如果整点报时嘀1秒
      webbell = 1;
      bell = 1;
      if ( millis() - baoshiMillis > 120 ){   //如果秒数大于0,停止报时
         baoshi = 0;
            bell = 0;
       }
   }else{
/* */ bell = 0;
   }
}
   
         tobell();
       //   testbell(mm/250%2);
//for(int x =0;x<16;x++){
   // toled(x);
// }
}

zong0001 发表于 2019-3-20 21:53

前面的版本,洞洞板

zong0001 发表于 2019-3-20 21:55

阴历,惊蛰后第14天

rockze 发表于 2019-3-21 13:58

这个做得很好啊。我也用8266做过类似的,但WEB界面没你做得好。

但可惜现在手机太放便了,天气什么的都直接手机看...
而且单位,公司里,也不用这种LED屏,都直接用大屏显示器做天气,信息的显示。
这种LED屏算是过时了~~

mzbbzy 发表于 2019-3-21 15:45

很棒啊!请问PCB和程序能卖么?

zong0001 发表于 2019-3-21 22:24

rockze 发表于 2019-3-21 13:58
这个做得很好啊。我也用8266做过类似的,但WEB界面没你做得好。

但可惜现在手机太放便了,天气什么的都直 ...

这个屏就是废弃不用拆的,主要还是温湿度采集集中监测啥的

zong0001 发表于 2019-3-21 22:32

mzbbzy 发表于 2019-3-21 15:45
很棒啊!请问PCB和程序能卖么?

还在修改,另外还用服务器端相关网站代码。后期再琢磨双色或全彩的

0storm0 发表于 2019-3-22 12:52

有参考的代码么?

rockze 发表于 2019-3-22 13:31

zong0001 发表于 2019-3-21 22:24
这个屏就是废弃不用拆的,主要还是温湿度采集集中监测啥的

这种旧屏我也有几块,本来想做个简单的时钟。

但看了几天感觉很刺眼,然后扔一边了~

mzbbzy 发表于 2019-3-22 14:49

zong0001 发表于 2019-3-21 22:32
还在修改,另外还用服务器端相关网站代码。后期再琢磨双色或全彩的

好吧,那我就持续关注着吧
页: [1] 2
查看完整版本: 基于Esp8266的点阵时钟