On Friday 19 February 2016 15:02:56 Ralph Corderoy wrote:
> Also, compile with the C compiler option -Wall to turn on all warnings.
> You're probably doing

I am using -Wall and also -g to turn on debugging.

>     while (foo = 1) ...
> 
> and it's never false.

My loop doesn't use while it looks like this:

        for (;;)
        {
                printf ('Daylight LEDs Brighten')
                for (bright = LowPC ; bright < HiPC ; ++bright)
                {
                        pwmWrite (1, bright) ;
                        delay (PWM_Pause_Time) ;
                }

        etc.....
        }

This is the main bit that I culled from Gordon Henderson's example, which 
works.  The vars are declared and initialised just before entering the loop.

I think I'm right in saying that this will also never come come back, but I 
get no O/P to the console, not even the printf statement.  Also, the LED 
doesn't illuminate, let alone brighten.

-- 
        
        Terry Coles

        

--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to