title: How to compile AVR code in Arduino?
body: <p>Why does the following code not work in Arduino?</p>
  
  <pre><code>#include&lt;avr/io.h&gt;
  void setup()
  {
      DDRA = 0xFF;
  }
  void loop()
  {
      PORTA = 0xAA;
      _delay_ms(1000);
      PORTA = 0x55;
      _delay_ms(1000);
  }
  </code></pre>
  
  <p>I get the following error.
  "DDRA was not declared in this scope."</p>
  
  <p>As I know, arduino uses AVR microcontrollers, so why can't we use AVR code
  in arduino boards?</p>