Keep getting the fatal error: avr/io.h: No such file or directory

#include <avr/io.h>
//#include “atmega328p.def”

//typedef bool charMapType[8][8];

unsigned char bigHeart = {
0x66,
0xFF,
0xFF,
0xFF,
0x7E,
0x3C,
0x00
};

const int columnPins = { 6,11,10,3,17,4,8,9 };
const int rowPins = { 2,7,19,5,13,18,12,16 };

void setup() {
int i;
for ( i = 0; i < 8; i++)
{
pinMode(rowPins*, OUTPUT); // make all the LED pins outputs*

_ pinMode(columnPins*, OUTPUT);_
_ digitalWrite(columnPins, HIGH); // disconnect column pins from Ground*
* }
}
void loop() {
int pulseDelay = 800 ; // milliseconds to wait between beats*
* show(smallHeart, 80); // show the small heart image for 100 ms*
* show(bigHeart, 160); // followed by the big heart for 200ms*
* delay(pulseDelay); // show nothing between beats*
}
// routine to show a frame of an image stored in the array pointed to by the image parameter.
// the frame is repeated for the given duration in milliseconds
void show( byte * image, unsigned long duration)
{
* unsigned long start = millis(); // begin timing the animation*
* while (start + duration > millis()) // loop until the duration period has passed*
* {
for(int row = 0; row < 8; row++)
{
digitalWrite(rowPins[row], HIGH); // connect row to +5 volts*
* for(int column = 0; column < 8; column++)
{
boolean pixel = bitRead(image[row],column);
if(pixel == 1)
{
digitalWrite(columnPins[column], LOW); // connect column to Gnd*
* }
delayMicroseconds(300); // a small delay for each LED*
* digitalWrite(columnPins[column], HIGH); // disconnect column from Gnd*
* }
digitalWrite(rowPins[row], LOW); // disconnect LEDs*
* }
}
}*
So it also keeps telling me OUTPUT and HIGH aren’t found.
using this to produce the disassembly code:
avr-gcc -mmcu=atmega328p -Wall -Os -o heart.elf heart.c_

So it also keeps telling me OUTPUT and HIGH aren't found.

Well, they are not defined in avr/io.h, either.

Which Arduino? Which version of the IDE? Why do you think you need to include avr/io.h?

I'm programming an uno. The .ino code had that. I'm trying to convert it to C then to assembly to write back onto the arduino. How should I go about making the pins outputs? I could set HIGH to 1.

The .ino code had that. I'm trying to convert it to C then to assembly to write back onto the arduino.

It seems to me that by the time you are ready to undertake this that you are able to determine what include files you need, if any, and to understand the build process (including the ability to set verbose mode and look at the intermediate files produced).

How should I go about making the pins outputs?

In an ino file, a C file, or in assembler?

This won’t do what you think it will:

  for ( i = 0; i < 8; i++)
   {
      pinMode(rowPins, OUTPUT); // make all the LED pins outputs
      pinMode(columnPins, OUTPUT);
      digitalWrite(columnPins, HIGH); // disconnect column pins from Ground
    }

Try instead:

  for ( i = 0; i < 8; i++)
   {
      pinMode(rowPins[i], OUTPUT); // make all the LED pins outputs
      pinMode(columnPins[i], OUTPUT);
      digitalWrite(columnPins[i], HIGH); // disconnect column pins from Ground
    }

Maybe that’s the cause of your errors.

Henry_Best:
Maybe that's the cause of your errors.

It is the cause of the italics though (the [i] has been removed)

@jlach9: Please edit your post, select the code, and put it between [code][/code] tags.

You can do that by hitting the “Code” icon above the posting area. It is the first icon, with the symbol: </>

jlach9:
I'm programming an uno. The .ino code had that. I'm trying to convert it to C then to assembly to write back onto the arduino. How should I go about making the pins outputs? I could set HIGH to 1.

Which version of the IDE?

jlach9:
I'm trying to convert it to C then to assembly to write back onto the arduino.

It's not C right now, I gather?

Use code tag for pasting your codes.

Which version of IDE you are using, i have already tested code in adruino v 1.6.4 later version.
i have made small changes also.

#include <avr/io.h>
//#include "atmega328p.def"

//typedef bool charMapType[8][8];

unsigned char bigHeart[] = {
  0x66,
  0xFF,
  0xFF,
  0xFF,
  0x7E,
  0x3C,
  0x00
};


 int columnPins[8] = { 6, 11, 10, 3, 17, 4, 8, 9 };
 int rowPins[8] = { 2, 7, 19, 5, 13, 18, 12, 16 };

void setup() {
  int i;
  for ( i = 0; i < 8; i++)
  {
    pinMode(rowPins[i], OUTPUT); // make all the LED pins outputs
    pinMode(columnPins[i], OUTPUT);
    digitalWrite(columnPins[i], HIGH); // disconnect column pins from Ground
  }
}

void loop() {
  int pulseDelay = 800 ; // milliseconds to wait between beats
//  show(smallHeart, 80); // show the small heart image for 100 ms
  show(bigHeart, 160); // followed by the big heart for 200ms
  delay(pulseDelay); // show nothing between beats
}
// routine to show a frame of an image stored in the array pointed to by the image parameter.
// the frame is repeated for the given duration in milliseconds
void show( byte * image, unsigned long duration)
{
  unsigned long start = millis(); // begin timing the animation
  while (start + duration > millis()) // loop until the duration period has passed
  {
    for (int row = 0; row < 8; row++)
    {
      digitalWrite(rowPins[row], HIGH); // connect row to +5 volts
      for (int column = 0; column < 8; column++)
      {
        boolean pixel = bitRead(image[row], column);
        if (pixel == 1)
        {
          digitalWrite(columnPins[column], LOW); // connect column to Gnd
        }
        delayMicroseconds(300); // a small delay for each LED
        digitalWrite(columnPins[column], HIGH); // disconnect column from Gnd
      }
      digitalWrite(rowPins[row], LOW); // disconnect LEDs
    }
  }
}