esp_clock: set brightness

This commit is contained in:
Nicu Hodos 2020-05-09 12:21:02 +02:00
parent d9f11a5436
commit 29ed25cd51

View File

@ -29,14 +29,16 @@
#include <Adafruit_LEDBackpack.h> // Support for the Backpack FeatherWing
#include <Adafruit_GFX.h> // Adafruit's graphics library
#define VBATPIN 9 // Pin to read battery voltage
//##########################################################################
// Globals
//##########################################################################
#define STASSID "vulturul"
#define STAPSK "***REMOVED***"
#define TIME_24_HOUR true
#define DISPLAY_ADDRESS 0x70
#define BRIGHTNESS 7
// Create display object
Adafruit_7segment clockDisplay = Adafruit_7segment();
@ -49,9 +51,6 @@ int tzOffset = +2; // Time zone offset (-4 = US Eastern time)
bool blinkColon = false; // Track colon status to blink once/sec
int status = WL_IDLE_STATUS;
#define STASSID "vulturul"
#define STAPSK "***REMOVED***"
unsigned int localPort = 2390; // Local port to listen for UDP packets
IPAddress timeServer(129,6,15,28); // time.nist.gov NTP server
const int NTP_PACKET_SIZE = 48; // NTP time stamp is in the first 48 bytes
@ -137,6 +136,7 @@ void setup() {
// Set up the display.
clockDisplay.begin(DISPLAY_ADDRESS);
clockDisplay.setBrightness(BRIGHTNESS);
// Attempt to conect to the WiFi network.
Serial.println("Connecting to WiFi netowrk.");