Question

I'm trying to write a simple / my first hello world program for the arduino using ther IDE.

I have the following code block:

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.println("Hello, world!");
  delay(1000);
}

When i compile, I get the following error message:

/home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/avr-g++: line 3: /home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/../bin.gcc/avr-g++: cannot execute binary file
/home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/avr-g++: line 3: /home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/../bin.gcc/avr-g++: Success
/home/jj/Documents/arduino-1.0.5/hardware/tools/avr/bin/avr-g++ returned 126

I'm not sure how to resolve this. Any suggestions?

EDIT 1

How I've connected the Arduino:

I've connected it via USB. I can see it via the menu option in the IDE... and it's checked off properly. I've also ensured that I've selected the correct board type - UNO. the board itself has power. The ON led is green. And when i upload the code, the TX led flashes.

EDIT 2

Following the advice found here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=18183

I renamed the folder and it compiles. But it doesn't let me upload the code to the board. I get the error:

Binary sketch size: 1,672 bytes (of a 32,256 byte maximum)
/home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: 1: /home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: ELF: not found
/home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: 2: /home/jj/Documents/arduino-1.0.5/hardware/tools/avrdude: Syntax error: "(" unexpected
Was it helpful?

Solution

I completely uninstalled the Arduino IDE and all dependencies. Then i used the software center in ubuntu to find and install the IDE. and now its working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top