X-Git-Url: http://www.average.org/gitweb/?p=sensor-light.git;a=blobdiff_plain;f=msp430%2Fmain.c;h=03786aa4b5cb1ab5383644151f2d92310d73eb56;hp=543022962a06b114721d3c7bb0cfadd34d40b06b;hb=c9ef989a5af20427a69004b565b48e7e30316326;hpb=c289f198e917c6a6726e8ead0937a36662e3efff diff --git a/msp430/main.c b/msp430/main.c index 5430229..03786aa 100644 --- a/msp430/main.c +++ b/msp430/main.c @@ -6,7 +6,7 @@ enum {ev_btn1 = 0, ev_btn2, ev_pir1, ev_pir2, ev_tmr, ev_adc, ev_MAX}; #define PWM_ORDER 10 #define PWM_HALF 5 -#define LIGHT_THRESHOLD 200 +#define LIGHT_THRESHOLD 600 #define TIME_ON 16 #ifdef ADCSC /* Let us hope that this is a "new" model */ @@ -114,10 +114,6 @@ int main(void) P1OUT |= BIT_GL; // Set green LED on if (events & 1< 0) { - Time_Left = TIME_ON; - continue; - } // Sampling and conversion start #ifdef ADCENC ADCCTL0 |= ADCENC | ADCSC; @@ -131,8 +127,6 @@ int main(void) if (events & 1<