/elec/audio-switcher

To get this branch, use:
bzr branch http://bzr.ed.am/elec/audio-switcher

« back to all changes in this revision

Viewing changes to test/relay-switch/test.ino

  • Committer: Tim Marston
  • Date: 2012-11-22 18:27:56 UTC
  • Revision ID: tim@ed.am-20121122182756-htn5j0b912tyx4w2
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
void setup()
 
3
{
 
4
        pinMode( 7, INPUT );
 
5
        digitalWrite( 7, HIGH );
 
6
 
 
7
        pinMode( 13, OUTPUT );
 
8
}
 
9
 
 
10
void loop()
 
11
{
 
12
//      static bool state = false;
 
13
//      state = !state;
 
14
//      delay( 1000 );
 
15
 
 
16
        bool state = !digitalRead( 7 );
 
17
 
 
18
        digitalWrite( 13, state? HIGH : LOW );
 
19
}