forked from luon/wordclock
Some comsmetic changes
This commit is contained in:
parent
38da3b00c1
commit
f74e4aedca
|
@ -159,7 +159,7 @@ char buf[50]; // time output string for debugging
|
||||||
DS1302 rtc(DS1302CEPin, DS1302IOPin, DS1302CLKPin);
|
DS1302 rtc(DS1302CEPin, DS1302IOPin, DS1302CLKPin);
|
||||||
|
|
||||||
// ProtoThread structures (one for each thread)
|
// ProtoThread structures (one for each thread)
|
||||||
static struct pt buttons_thread_pt, wordclock_pt;
|
static struct pt blink_thread_pt, buttons_thread_pt, wordclock_thread_pt;
|
||||||
|
|
||||||
void print_DS1302time()
|
void print_DS1302time()
|
||||||
{
|
{
|
||||||
|
@ -209,9 +209,9 @@ void setup()
|
||||||
|
|
||||||
current_brightnes=MAXBRIGHTNESS;
|
current_brightnes=MAXBRIGHTNESS;
|
||||||
|
|
||||||
//Serial.begin(9600); // setup the serial port to 9600 baud
|
//Serial.begin(9600); // setup the serial port to 9600 baud
|
||||||
Serial.begin(115200); // setup the serial port to 115200 baud
|
Serial.begin(115200); // setup the serial port to 115200 baud
|
||||||
SWversion(); // Display the version number of the software
|
SWversion(); // Display the version number of the software
|
||||||
|
|
||||||
// test whether the DS1302 is there
|
// test whether the DS1302 is there
|
||||||
Serial.print("Verifying DS1302 ");
|
Serial.print("Verifying DS1302 ");
|
||||||
|
@ -530,7 +530,12 @@ static int buttons_thread(struct pt *pt)
|
||||||
PT_END(pt);
|
PT_END(pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wordclock(struct pt *pt)
|
static int blink_thread(struct pt *pt)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static int wordclock_thread(struct pt *pt)
|
||||||
{
|
{
|
||||||
static unsigned long int lightlevel_avg;
|
static unsigned long int lightlevel_avg;
|
||||||
unsigned long int lightlevel_sample;
|
unsigned long int lightlevel_sample;
|
||||||
|
@ -647,8 +652,8 @@ static int wordclock(struct pt *pt)
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
// call each function continuously
|
// call each thread continuously
|
||||||
wordclock(&wordclock_pt);
|
wordclock_thread(&wordclock_thread_pt);
|
||||||
buttons_thread(&buttons_thread_pt);
|
buttons_thread(&buttons_thread_pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue