further work on 2nd display
This commit is contained in:
parent
ee665ae432
commit
3312649c01
89
src/disp.cpp
89
src/disp.cpp
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
byte buffer[7]; // "width,height,data[5]" single character buffer.
|
byte buffer[7]; // "width,height,data[5]" single character buffer.
|
||||||
|
|
||||||
|
unsigned char reverse(unsigned char b)
|
||||||
|
{
|
||||||
unsigned char reverse(unsigned char b) {
|
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
|
||||||
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
|
b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
|
||||||
b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
|
b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
|
||||||
b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
|
return b;
|
||||||
return b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void printCharOffset(char c, int offset, LedControl lc)
|
void printCharOffset(char c, int offset, LedControl lc)
|
||||||
|
|
@ -19,11 +18,83 @@ void printCharOffset(char c, int offset, LedControl lc)
|
||||||
memcpy_P(buffer, CH + 7 * c, 7);
|
memcpy_P(buffer, CH + 7 * c, 7);
|
||||||
for (int i = 0; i <= buffer[0]; i++)
|
for (int i = 0; i <= buffer[0]; i++)
|
||||||
{
|
{
|
||||||
lc.setRow(0, i+offset, reverse(buffer[i + 2]));
|
lc.setRow(0, i + offset, reverse(buffer[i + 2]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void printChar(char c, LedControl lc)
|
void printChar(char c, LedControl lc)
|
||||||
{
|
{
|
||||||
printCharOffset(c,2,lc);
|
printCharOffset(c, 2, lc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shiftPrintChar(char c, int delayTime, LedControl lc)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
printCharOffset(c, i, lc);
|
||||||
|
delay(delayTime);
|
||||||
|
lc.setColumn(0, i, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void printStringWithShift(char *s, int delayTime, LedControl lc)
|
||||||
|
{
|
||||||
|
while (*s != 0)
|
||||||
|
{
|
||||||
|
shiftPrintChar(*s, delayTime, lc);
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void printStringWithWait(char *s, int delayTime, LedControl lc)
|
||||||
|
{
|
||||||
|
while (*s != 0)
|
||||||
|
{
|
||||||
|
printChar(*s, lc);
|
||||||
|
delay(delayTime);
|
||||||
|
lc.clearDisplay(0);
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void printString(char *s, LedControl lc)
|
||||||
|
{
|
||||||
|
int offset = 0;
|
||||||
|
int display = 0;
|
||||||
|
while (*s != 0)
|
||||||
|
{
|
||||||
|
if (*s < 32)
|
||||||
|
return;
|
||||||
|
*s -= 32;
|
||||||
|
memcpy_P(buffer, CH + 7 * *s, 7);
|
||||||
|
for (int i = 0; i <= buffer[0]; i++)
|
||||||
|
{
|
||||||
|
if (i+offset>7) {
|
||||||
|
offset = offset-8;
|
||||||
|
display++;
|
||||||
|
}
|
||||||
|
lc.setRow(display, i + offset, reverse(buffer[i + 2]));
|
||||||
|
}
|
||||||
|
offset+=buffer[0];
|
||||||
|
offset++;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void fadeOut(int max, int time, LedControl lc)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < max; i++)
|
||||||
|
{
|
||||||
|
lc.setIntensity(0, max - i);
|
||||||
|
delay(time / max);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void fadeIn(int max, int time, LedControl lc)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < max; i++)
|
||||||
|
{
|
||||||
|
lc.setIntensity(0, i);
|
||||||
|
delay(time / max);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
src/disp.h
21
src/disp.h
|
|
@ -4,7 +4,22 @@
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
#include "LedControl.h"
|
#include "LedControl.h"
|
||||||
|
|
||||||
|
void printCharOffset(char c, int offset, LedControl lc);
|
||||||
|
|
||||||
|
void printChar(char c,LedControl lc);
|
||||||
|
|
||||||
|
void shiftPrintChar(char c, int delayTime, LedControl lc);
|
||||||
|
|
||||||
|
void printStringWithShift(char* s, int delayTime, LedControl lc);
|
||||||
|
|
||||||
|
void printStringWithWait(char* s, int delayTime, LedControl lc);
|
||||||
|
|
||||||
|
void printString(char* s, LedControl lc);
|
||||||
|
|
||||||
|
|
||||||
|
void fadeOut(int max, int time, LedControl lc);
|
||||||
|
|
||||||
|
void fadeIn(int max, int time, LedControl lc);
|
||||||
|
|
||||||
// Data array is stored in program memory (see memcpy_P for access).
|
// Data array is stored in program memory (see memcpy_P for access).
|
||||||
// Parameters are width, height, character data...
|
// Parameters are width, height, character data...
|
||||||
|
|
@ -38,8 +53,8 @@ PROGMEM const unsigned char CH[] = {
|
||||||
4, 8, B1100001, B0010001, B0001001, B0000111, B0000000, // 7
|
4, 8, B1100001, B0010001, B0001001, B0000111, B0000000, // 7
|
||||||
4, 8, B0110110, B1001001, B1001001, B0110110, B0000000, // 8
|
4, 8, B0110110, B1001001, B1001001, B0110110, B0000000, // 8
|
||||||
4, 8, B0000110, B1001001, B1001001, B0111110, B0000000, // 9
|
4, 8, B0000110, B1001001, B1001001, B0111110, B0000000, // 9
|
||||||
2, 8, B01010000, B0000000, B0000000, B0000000, B0000000, // :
|
1, 8, B01010000, B0000000, B0000000, B0000000, B0000000, // :
|
||||||
2, 8, B10000000, B01010000, B0000000, B0000000, B0000000, // ;
|
1, 8, B10000000, B01010000, B0000000, B0000000, B0000000, // ;
|
||||||
3, 8, B0010000, B0101000, B1000100, B0000000, B0000000, // <
|
3, 8, B0010000, B0101000, B1000100, B0000000, B0000000, // <
|
||||||
3, 8, B0010100, B0010100, B0010100, B0000000, B0000000, // =
|
3, 8, B0010100, B0010100, B0010100, B0000000, B0000000, // =
|
||||||
3, 8, B1000100, B0101000, B0010000, B0000000, B0000000, // >
|
3, 8, B1000100, B0101000, B0010000, B0000000, B0000000, // >
|
||||||
|
|
@ -109,8 +124,6 @@ PROGMEM const unsigned char CH[] = {
|
||||||
4, 8, B0001000, B0000100, B0001000, B0000100, B0000000, // ~
|
4, 8, B0001000, B0000100, B0001000, B0000100, B0000000, // ~
|
||||||
};
|
};
|
||||||
|
|
||||||
void printCharOffset(char c, int offset, LedControl lc);
|
|
||||||
|
|
||||||
void printChar(char c,LedControl lc);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
257
src/main.cpp
257
src/main.cpp
|
|
@ -1,6 +1,6 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "LedControl.h"
|
#include "LedControl.h"
|
||||||
#include "RTClib.h" // RTC library
|
#include "RTClib.h" // RTC library
|
||||||
|
|
||||||
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
|
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
|
||||||
#include <ESP8266WebServer.h>
|
#include <ESP8266WebServer.h>
|
||||||
|
|
@ -28,31 +28,25 @@ We have only a single MAX72XX.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
int iteration = 0;
|
int iteration = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// initialize RTC library
|
// initialize RTC library
|
||||||
RTC_DS1307 rtc;
|
RTC_DS1307 rtc;
|
||||||
DateTime now;
|
DateTime now;
|
||||||
|
|
||||||
#define SCREEN_WIDTH 128 // OLED display width, in pixels
|
#define SCREEN_WIDTH 128 // OLED display width, in pixels
|
||||||
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
|
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
|
||||||
|
|
||||||
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
|
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
|
||||||
#define OLED_RESET D8-1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
#define OLED_RESET D8 - 1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
||||||
//Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
|
//Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
|
||||||
|
|
||||||
|
|
||||||
// Max7219 PINs:
|
// Max7219 PINs:
|
||||||
#define MAX_CLK D5
|
#define MAX_CLK D5
|
||||||
#define MAX_CS D6
|
#define MAX_CS D6
|
||||||
#define MAX_DIN D7
|
#define MAX_DIN D7
|
||||||
|
|
||||||
LedControl lc = LedControl(MAX_DIN, MAX_CLK, MAX_CS, 1);
|
LedControl lc = LedControl(MAX_DIN, MAX_CLK, MAX_CS, 2);
|
||||||
|
|
||||||
|
|
||||||
/* we always wait a bit between updates of the display */
|
/* we always wait a bit between updates of the display */
|
||||||
|
|
||||||
|
|
@ -62,8 +56,8 @@ void configModeCallback(WiFiManager *myWiFiManager);
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
//WiFiManager
|
//WiFiManager
|
||||||
//Local intialization. Once its business is done, there is no need to keep it around
|
//Local intialization. Once its business is done, there is no need to keep it around
|
||||||
WiFiManager wifiManager;
|
WiFiManager wifiManager;
|
||||||
//reset settings - for testing
|
//reset settings - for testing
|
||||||
|
|
@ -71,7 +65,7 @@ Serial.begin(115200);
|
||||||
|
|
||||||
//set callback that gets called when connecting to previous WiFi fails, and enters Access Point mode
|
//set callback that gets called when connecting to previous WiFi fails, and enters Access Point mode
|
||||||
|
|
||||||
/*
|
/*
|
||||||
wifiManager.setAPCallback(configModeCallback);
|
wifiManager.setAPCallback(configModeCallback);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -97,10 +91,11 @@ Serial.begin(115200);
|
||||||
/* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */
|
/* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */
|
||||||
|
|
||||||
lc.shutdown(0, false);
|
lc.shutdown(0, false);
|
||||||
|
lc.shutdown(1, false);
|
||||||
|
|
||||||
int devices = lc.getDeviceCount();
|
int devices = lc.getDeviceCount();
|
||||||
Serial.print("devices: ");
|
Serial.print("devices: ");
|
||||||
Serial.println(devices,10);
|
Serial.println(devices, 10);
|
||||||
|
|
||||||
/* Set the brightness to a medium values */
|
/* Set the brightness to a medium values */
|
||||||
|
|
||||||
|
|
@ -108,27 +103,29 @@ Serial.begin(115200);
|
||||||
|
|
||||||
lc.clearDisplay(0);
|
lc.clearDisplay(0);
|
||||||
|
|
||||||
|
lc.setIntensity(1, 15);
|
||||||
|
|
||||||
|
lc.clearDisplay(1);
|
||||||
|
|
||||||
|
for (int i=0;i<8;i++) {
|
||||||
|
lc.setDigit(1,i,8,true);
|
||||||
|
}
|
||||||
|
|
||||||
/* and clear the display */
|
/* and clear the display */
|
||||||
|
|
||||||
|
Serial.println("starting");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Serial.println("starting");
|
|
||||||
|
|
||||||
delay(3000); // wait for console opening
|
delay(3000); // wait for console opening
|
||||||
|
|
||||||
//rtc.begin();
|
//rtc.begin();
|
||||||
|
|
||||||
if (! rtc.begin()) {
|
if (!rtc.begin())
|
||||||
|
{
|
||||||
Serial.println("Couldn't find RTC");
|
Serial.println("Couldn't find RTC");
|
||||||
//while (1);
|
//while (1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
|
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void configModeCallback(WiFiManager *myWiFiManager)
|
void configModeCallback(WiFiManager *myWiFiManager)
|
||||||
|
|
@ -139,158 +136,46 @@ void configModeCallback(WiFiManager *myWiFiManager)
|
||||||
Serial.println(myWiFiManager->getConfigPortalSSID());
|
Serial.println(myWiFiManager->getConfigPortalSSID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void printNumber(int v)
|
||||||
|
{
|
||||||
|
int ones;
|
||||||
|
int tens;
|
||||||
|
int hundreds;
|
||||||
|
boolean negative;
|
||||||
|
|
||||||
void printNumber(int v) {
|
if (v < -999 || v > 999)
|
||||||
int ones;
|
return;
|
||||||
int tens;
|
if (v < 0)
|
||||||
int hundreds;
|
{
|
||||||
boolean negative;
|
negative = true;
|
||||||
|
v = v * -1;
|
||||||
if(v < -999 || v > 999)
|
|
||||||
return;
|
|
||||||
if(v<0) {
|
|
||||||
negative=true;
|
|
||||||
v=v*-1;
|
|
||||||
}
|
|
||||||
ones=v%10;
|
|
||||||
v=v/10;
|
|
||||||
tens=v%10;
|
|
||||||
v=v/10;
|
|
||||||
hundreds=v;
|
|
||||||
if(negative) {
|
|
||||||
//print character '-' in the leftmost column
|
|
||||||
lc.setChar(0,3,'-',false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//print a blank in the sign column
|
|
||||||
lc.setChar(0,3,' ',false);
|
|
||||||
}
|
|
||||||
//Now print the number digit by digit
|
|
||||||
lc.setDigit(0,2,(byte)hundreds,false);
|
|
||||||
lc.setDigit(0,1,(byte)tens,false);
|
|
||||||
lc.setDigit(0,0,(byte)ones,false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
x and y swapped
|
|
||||||
*/
|
|
||||||
void setColumn(LedControl lc,int addr, int col, byte value) {
|
|
||||||
byte val;
|
|
||||||
|
|
||||||
if(col<0 || col>7)
|
|
||||||
return;
|
|
||||||
for(int row=7;row>=0;row--) {
|
|
||||||
val=value >> (7-row);
|
|
||||||
val=val & 0x01;
|
|
||||||
lc.setLed(addr,col,row,val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//int two[] = {0,130,193,161,145,137,135,0};
|
|
||||||
int two[] = {65,131,133,137,145,97};
|
|
||||||
|
|
||||||
void drawChar(int arr[],int size,int offset) {
|
|
||||||
lc.clearDisplay(0);
|
|
||||||
|
|
||||||
for (int i=0;i<size;i++) {
|
|
||||||
//lc.setColumn(0,i,two[i]);
|
|
||||||
setColumn(lc,0,i+offset,arr[i]);
|
|
||||||
}
|
}
|
||||||
|
ones = v % 10;
|
||||||
|
v = v / 10;
|
||||||
|
tens = v % 10;
|
||||||
/*
|
v = v / 10;
|
||||||
lc.setLed(0,2,0,true);
|
hundreds = v;
|
||||||
lc.setLed(0,3,0,true);
|
if (negative)
|
||||||
lc.setLed(0,4,0,true);
|
{
|
||||||
lc.setLed(0,5,0,true);
|
//print character '-' in the leftmost column
|
||||||
|
lc.setChar(0, 3, '-', false);
|
||||||
lc.setLed(0,1,1,true);
|
}
|
||||||
lc.setLed(0,6,1,true);
|
else
|
||||||
lc.setLed(0,6,2,true);
|
{
|
||||||
lc.setLed(0,5,3,true);
|
//print a blank in the sign column
|
||||||
lc.setLed(0,4,4,true);
|
lc.setChar(0, 3, ' ', false);
|
||||||
lc.setLed(0,3,5,true);
|
}
|
||||||
lc.setLed(0,2,6,true);
|
//Now print the number digit by digit
|
||||||
|
lc.setDigit(0, 2, (byte)hundreds, false);
|
||||||
lc.setLed(0,1,7,true);
|
lc.setDigit(0, 1, (byte)tens, false);
|
||||||
lc.setLed(0,2,7,true);
|
lc.setDigit(0, 0, (byte)ones, false);
|
||||||
lc.setLed(0,3,7,true);
|
|
||||||
lc.setLed(0,4,7,true);
|
|
||||||
lc.setLed(0,5,7,true);
|
|
||||||
lc.setLed(0,6,7,true);
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void writeArduinoOnMatrix() {
|
|
||||||
/* here is the data for the characters */
|
|
||||||
byte a[5]={B01111110,B10001000,B10001000,B10001000,B01111110};
|
|
||||||
byte r[5] ={B00111110,B00010000,B00100000,B00100000,B00010000};
|
|
||||||
byte d[5]={B00011100,B00100010,B00100010,B00010010,B11111110};
|
|
||||||
byte u[5]={B00111100,B00000010,B00000010,B00000100,B00111110};
|
|
||||||
byte i[5]={B00000000,B00100010,B10111110,B00000010,B00000000};
|
|
||||||
byte n[5]={B00111110,B00010000,B00100000,B00100000,B00011110};
|
|
||||||
byte o[5]={B00011100,B00100010,B00100010,B00100010,B00011100};
|
|
||||||
|
|
||||||
/* now display them one by one with a small delay */
|
|
||||||
lc.setRow(0,0,a[0]);
|
|
||||||
lc.setRow(0,1,a[1]);
|
|
||||||
lc.setRow(0,2,a[2]);
|
|
||||||
lc.setRow(0,3,a[3]);
|
|
||||||
lc.setRow(0,4,a[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,r[0]);
|
|
||||||
lc.setRow(0,1,r[1]);
|
|
||||||
lc.setRow(0,2,r[2]);
|
|
||||||
lc.setRow(0,3,r[3]);
|
|
||||||
lc.setRow(0,4,r[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,d[0]);
|
|
||||||
lc.setRow(0,1,d[1]);
|
|
||||||
lc.setRow(0,2,d[2]);
|
|
||||||
lc.setRow(0,3,d[3]);
|
|
||||||
lc.setRow(0,4,d[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,u[0]);
|
|
||||||
lc.setRow(0,1,u[1]);
|
|
||||||
lc.setRow(0,2,u[2]);
|
|
||||||
lc.setRow(0,3,u[3]);
|
|
||||||
lc.setRow(0,4,u[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,i[0]);
|
|
||||||
lc.setRow(0,1,i[1]);
|
|
||||||
lc.setRow(0,2,i[2]);
|
|
||||||
lc.setRow(0,3,i[3]);
|
|
||||||
lc.setRow(0,4,i[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,n[0]);
|
|
||||||
lc.setRow(0,1,n[1]);
|
|
||||||
lc.setRow(0,2,n[2]);
|
|
||||||
lc.setRow(0,3,n[3]);
|
|
||||||
lc.setRow(0,4,n[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,o[0]);
|
|
||||||
lc.setRow(0,1,o[1]);
|
|
||||||
lc.setRow(0,2,o[2]);
|
|
||||||
lc.setRow(0,3,o[3]);
|
|
||||||
lc.setRow(0,4,o[4]);
|
|
||||||
delay(delaytime);
|
|
||||||
lc.setRow(0,0,0);
|
|
||||||
lc.setRow(0,1,0);
|
|
||||||
lc.setRow(0,2,0);
|
|
||||||
lc.setRow(0,3,0);
|
|
||||||
lc.setRow(0,4,0);
|
|
||||||
delay(delaytime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
|
|
||||||
DateTime now = rtc.now();
|
DateTime now = rtc.now();
|
||||||
|
|
||||||
Serial.print(now.year(), DEC);
|
Serial.print(now.year(), DEC);
|
||||||
Serial.print('/');
|
Serial.print('/');
|
||||||
Serial.print(now.month(), DEC);
|
Serial.print(now.month(), DEC);
|
||||||
|
|
@ -305,26 +190,15 @@ DateTime now = rtc.now();
|
||||||
Serial.print(now.second(), DEC);
|
Serial.print(now.second(), DEC);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
//printStringWithShift("TEST", 150, lc);
|
||||||
|
lc.setIntensity(0, 15);
|
||||||
|
|
||||||
//lc.setDigit(0,3,now.hour()/10,false);
|
|
||||||
//lc.setDigit(0,2,now.hour()%10,false);
|
char str[24];
|
||||||
//lc.setDigit(0,1,now.minute()/10,false);
|
sprintf(str, "%02d%02d", now.hour(), now.minute());
|
||||||
//lc.setDigit(0,0,now.minute()%10,false);
|
printString(str, lc);
|
||||||
|
delay(800);
|
||||||
/*
|
/*
|
||||||
for (int i=0;i<8;i++) {
|
|
||||||
for (int j=0;j<8;j++) {
|
|
||||||
lc.clearDisplay(0);
|
|
||||||
//lc.setDigit(i,j,now.second()%10,true);
|
|
||||||
//lc.setLed(i,j,0,false);
|
|
||||||
lc.setLed(0,j,i,true);
|
|
||||||
|
|
||||||
delay(100);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//drawChar(two,6,1);
|
|
||||||
//writeArduinoOnMatrix();
|
|
||||||
|
|
||||||
int dl = 500;
|
int dl = 500;
|
||||||
printChar('1',lc);
|
printChar('1',lc);
|
||||||
delay(dl);
|
delay(dl);
|
||||||
|
|
@ -346,15 +220,12 @@ DateTime now = rtc.now();
|
||||||
delay(dl);
|
delay(dl);
|
||||||
printChar('0',lc);
|
printChar('0',lc);
|
||||||
delay(dl);
|
delay(dl);
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
lc.setDigit(0,0,3,false);
|
lc.setDigit(0,0,3,false);
|
||||||
lc.setDigit(0,1,2,false);
|
lc.setDigit(0,1,2,false);
|
||||||
lc.setDigit(0,2,1,false);
|
lc.setDigit(0,2,1,false);
|
||||||
lc.setDigit(0,3,0,false);
|
lc.setDigit(0,3,0,false);
|
||||||
*/
|
*/
|
||||||
//delay(1000);
|
//delay(1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue