added arduino archive programs to /firmware/ref/archive-code/arduino
[athena:athena.git] / firmware / ref / archive-code / atmega / SoundSensorTest / SoundSensorTest.c
1 \r
2 #include <avr/io.h>\r
3 #include <util/delay.h>\r
4 \r
5 int main()\r
6 {\r
7         DDRA=0x00;\r
8         DDRD=0xFF;\r
9 \r
10         while(1)\r
11         {\r
12                 if( PINA & 0x80)\r
13                 {\r
14                         PORTD=0xff;\r
15                         //_delay_ms(900);\r
16                 }\r
17 \r
18                 else\r
19                 PORTD=0x00;\r
20 \r
21                 //else\r
22                 //PORTD=0x00;\r
23 \r
24 \r
25         }\r
26 \r
27 \r
28 }\r