user490: I use my Arduino IDE to either upload my sketch to a Arduino or ATTiny or ATmega328. As you know each device can have a different pinout. Does the Arduino compiler support ifdef, depending on the board I am connected to?
For example
#ifdef Attiny85
       a=0; b=1; c=2;
#else
       // arduino
       a=9; b=10; c=11;
#endif


user220: Yes. Here is the syntax:
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
    //Code here
#endif

You can also do something like this for the Mega:
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    //Code here
#endif

Assuming the implementation for the ATtiny is correct, your code should be like this:
#if defined (__AVR_ATtiny85__)
       a=0; b=1; c=2;
#else
       //Arduino
       a=9; b=10; c=11
#endif


490: <p>I use my Arduino IDE to either upload my sketch to a Arduino or ATTiny or ATmega328. As you know each device can have a different pinout. Does the Arduino compiler support <code>ifdef</code>, depending on the board I am connected to?</p>

<p>For example</p>

<pre><code>#ifdef Attiny85
       a=0; b=1; c=2;
#else
       // arduino
       a=9; b=10; c=11;
#endif
</code></pre>
 220: <p>Yes. Here is the syntax:</p>

<pre><code>#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)
    //Code here
#endif
</code></pre>

<p>You can also do something like this for the Mega:</p>

<pre><code>#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    //Code here
#endif
</code></pre>

<p>Assuming the implementation for the ATtiny is correct, your code should be like this:</p>

<pre><code>#if defined (__AVR_ATtiny85__)
       a=0; b=1; c=2;
#else
       //Arduino
       a=9; b=10; c=11
#endif
</code></pre>
