NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Customer Testimonials » Wicked!

April 25, 2012
by HexManiac
HexManiac's Avatar

It took about a week for my kit to arrive in the UK (I was expecting longer!), all working, no problems. :)

Thanks NerdKit guys!

April 25, 2012
by Ralphxyz
Ralphxyz's Avatar

Welcome HexManiac, hope to hear about your projects and of course your problems.

Ralph

April 25, 2012
by HexManiac
HexManiac's Avatar

I'm having one tiny problem at the moment:

I declare a function like...

void blink(bool changestate)
{
    if(changestate)
    {
        PORTC |= (1<<PC4);
    }
    else
    {
        PORTC &= ~(1<<PC4);
    }
}

and compiler says... test_bool.c:15: error: expected ')' before 'changestate'

If I change bool to int it works as expected. Can anyone explain why I get this error, and how I can fix?

April 25, 2012
by HexManiac
HexManiac's Avatar

Sorry, just realized this is not the right place for support requests!

Post a Reply

Please log in to post a reply.

Did you know that signed numbers need to be sign-extended when chaging variable sizes? Learn more...