Compare commits

..

No commits in common. "lcd_display" and "main" have entirely different histories.

2 changed files with 5 additions and 38 deletions

View File

@ -12,24 +12,17 @@
#include <FastLED.h>
// IO Pin Assignments
// moved PINs out of the way of LCD
const uint8_t pinLeds = 6;
const uint8_t pinButton = 7;
const uint8_t pinLeds = 3;
const uint8_t pinButton = 5;
const uint8_t pinBrightness = 0;
// Define MAC Address
byte mac[] = {
0xA8, 0x61, 0x0A, 0x10, 0x24, 0x02
0xA8, 0x61, 0x0A, 0x10, 0x24, 0x01
};
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
// these differ from the libary / example sketch default to avoid Ethernet shield pins
const int rs = 10, en = 9, d4 = 5, d5 = 8, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
// NTP Server to use
char* ntp_server = "de.ntp.pool.org";
char* ntp_server = "warpfire.warpzone";
// Number of LEDs in ring
const int ledRingSize = 60;

View File

@ -15,7 +15,6 @@
#include <Ethernet.h>
#include <Dns.h>
#include <Dhcp.h>
#include <LiquidCrystal.h>
#include "constants.h"
@ -37,13 +36,6 @@ void setup() {
// Begin serial port
Serial.begin(serialPortBaudRate);
// set up the LCD's number of columns and rows:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.print("Analoge LED Uhr");
lcd.setCursor(4, 3);
lcd.print("by Commander1024");
// Initialize Network and NTP
if (Ethernet.begin (mac) == 0) {
Serial.println ("Failed to configure Ethernet using DHCP");
@ -140,7 +132,6 @@ void loop() {
// Show clock
clearLeds();
showClock();
printLCDtime();
// Check/Renew DHCP
Ethernet.maintain ();
@ -165,23 +156,6 @@ void showClock() {
}
}
void printLCDtime() {
lcd.setCursor(0, 1);
lcd.print("Zeit: ");
lcd.setCursor(0, 2);
lcd.print(year(now()), DEC);
lcd.print(".");
lcd.print(month(now()), DEC);
lcd.print(".");
lcd.print(day(now()), DEC);
lcd.print(" ");
lcd.print(hour(now()), DEC);
lcd.print(":");
lcd.print(minute(now()), DEC);
lcd.print(":");
lcd.print(second(now()), DEC);
}
// Print debugging info over serial
void printDebugMessage() {
Serial.print("Current date/time: ");