set_digital_output errors - Help

OK, newbie here and I’ve had it with these errors. I’m trying to do the simplest thing in the world and I can’t get past this one function call. According to the Pololu AVR Library Command Reference, for Orangutan Digital I/O, you use the function:

set_digital_output(IO_D3, HIGH); // set pin PD3 as driving high output

AVR Studio 5 constantly gives me errors on this. My code now looks like this, in C:

int main(void)
{
// set pin PD3 as driving high output
static inline void set_digital_output(unsigned char IO_D3, unsigned char HIGH);
	
    while(1)
    {
        //TODO:: Please write your application code 
    }
}

and I get this error message:

expected ";", "," or ")" before numeric constant

Libraries are all installed at the right places. What am I doing wrong??? Please help. This is aggravating.

Hello, BMag.

Instead of writing a prototype for the function, you have to actually call it. Try this:

int main()
{
  set_digital_output(IO_D3, HIGH);
  while(1)
  {
  }
}

I suggest looking at more of our example code to familiarize yourself with what C code looks like.

Hello,

I just wanted to add that it is a huge exaggeration to call this “the simplest thing in the world”. You are trying to program a microcontroller that you have never used before, in a language you are not familiar with, using an development environment that we do not support, and rather than using a tested example program, you are writing your own code from scratch! You will likely have much more success if you start by following our instructions and start changing things only after you are comfortable with the basics.

-Paul