wordclock/wordclock/settings_example.h

62 lines
2.2 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
// DISPLAYTIME_MODE can either be DISPLAYTIME_FLOOR or DISPLAYTIME_ROUND:
//
// * floor: floor() (or truncate) the time to chunks of 5 minutes and where the
// additional 4 leds indicate the number of minutes you have to add to get the
// exact time. Thus, if you only look at the words, you have a maximum error
// of 4 minutes and 59 seconds. This is the traditional mode.
//
// * round: rounds the time to chunks of 5 minutes and where the two additional
// leds indicate if you have to add or subtract 1 or 2 minutes to get the
// exact time. Thus, if you only look at the words, you have a maximum error
// of 2 minutes and 29 seconds.
//
#define DISPLAYTIME_MODE DISPLAYTIME_FLOOR
// 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