/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-02 01:19:19 UTC
  • Revision ID: edam@waxworlds.org-20120202011919-rcu4pt8mq8pieujs
modified schematic and updated notes

Show diffs side-by-side

added added

removed removed

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