wordclock/wordclock/settings_example.h

48 lines
1.6 KiB
C

#ifndef SETTINGS_H
#define SETTINGS_H
// specify the language - defines the header to be included
// available choices - English, Danish, French, German
//#define LANGUAGE "English.h"
#define LANGUAGE "Dutch.h"
#define PRINT_DEBUG_LEVEL 1
// set SKIPSELFTEST to 1 to skip selftest
#define SKIPSELFTEST 1
// set USELIGHTSENSOR to 1 to use ambient light sensor connected to ADC0 (pin
// 23)
#define USELIGHTSENSOR 1
// analog input put to which ambiend light sensor is connected
#define LIGHTSENSOR_INPUTPIN 0
// bottom of light sensor (ambient light values at or lower than this level will
// be mapped to MINBRIGHTNESS)
#define LIGHTSENSOR_BOTTOM 0
// top of light sensor (ambient light values at or higher than this level will
// be mapped to MAXBRIGHTNESS)
#define LIGHTSENSOR_TOP 150
// slope of mapping function at bottom
#define LIGHTSENSOR_ALPHA1 0.02
// slope of mapping function at top
#define LIGHTSENSOR_ALPHA2 0.20
// weight for exponential decaying averaging (actual weigth is 2 ^
// LIGHTSENSOR_WEIGHT)
#define LIGHTSENSOR_WEIGHT 4
// base of exponential mapping (must be > 1)
#define LIGHTSENSOR_BASE 1.40
// N_PWM_STEPS could be increased to 21, but this causes some visible flickering
// at low intensities
#define N_PWM_STEPS 11
// NIGHT Brightness setting 0 = off, (N_PWM_STEPS - 1) = full
#define MINBRIGHTNESS 3
// DAY Brightness setting 0 = off, (N_PWM_STEPS - 1) = full
#define MAXBRIGHTNESS (N_PWM_STEPS - 1)
// start MINBRIGHTNESS at NIGHTLIGHTHOUR (7 pm)
#define NIGHTLIGHTHOUR 19
// start MAXBRIGHTNESS at DAYLIGHTHOUR (7 am)
#define DAYLIGHTHOUR 7
#endif //SETTINGS_H