/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/propeller-clock.ino

  • Committer: edam
  • Date: 2012-02-16 00:08:37 UTC
  • Revision ID: edam@waxworlds.org-20120216000837-ozbyl61w2n2thwa0
update arduino.mk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c++; compile-command: "BOARD=pro5v make"; -*- */
1
2
/*
2
3
 * propeller-clock.ino
3
4
 *
102
103
static bool inc_draw_mode = false;
103
104
 
104
105
// a bounce-managed button
105
 
static Bounce button( 3, 5 );
 
106
static Bounce button( 3, 50 );
106
107
 
107
108
// the time
108
109
static int time_hours = 0;
169
170
        num += 4;
170
171
 
171
172
        // pin 4 needs to be inverted (it's driving a PNP)
172
 
        if( num == 4 ) on = !on;
 
173
        // NOTE: PIN 4 TEMPORARILY DISABLED
 
174
        if( num == 4 ) on = true; //!on
173
175
 
174
176
        digitalWrite( num, on? HIGH : LOW );
175
177
}
323
325
 
324
326
        // set up mode-switch button on pin 3
325
327
        pinMode( 3, INPUT );
 
328
        digitalWrite( 3, HIGH );
326
329
 
327
330
        // get the time from the real-time clock
328
331
        int rtc_data[ 7 ];