Arduino 1.0.1 total breakdown on Linux

I encountered a problem today when I no longer can use the Arduino IDE to upload or even compile ANYTHING. I have a sketchbook full of working sketches that will not compile or load.

Blink will not compile! I get errors like this:

Blink:14: error: ‘pinMode’ was not declared in this scope
Blink.cpp: In function ‘void loop()’:
Blink:19: error: ‘HIGH’ was not declared in this scope
Blink:19: error: ‘digitalWrite’ was not declared in this scope
Blink:20: error: ‘delay’ was not declared in this scope
Blink:21: error: ‘LOW’ was not declared in this scope

I don't know enough about all this to decipher the problem. I recently reinstalled the program, and that may be the problem. I have installed again since the problem occurred. I have installed Java. I just don't get it? What did I do? How can I fix it? Am I missing a file? The file 'arduino.h' which I suspected was missing has been found in the cores folder. I have done reinstalls, restarts, tried different sketches, downloaded the software again... I have found the problem posted on several other forums, so I am hoping there is a solution to this.

Any help is appreciated.
Thanks,
Jim in Sweden

What release of Linux are you using? Are you installing the IDE from the repository?

I had problems with the repository version from Ubuntu, so I downloaded the Linux version from the Arduino site and unpacked it in a local directory. Then I ran the arduino shell script in the arduino directory, and it works good.

I am running 11.04
Installed from the Arduino site, running from the shell script makes no diff. I had run from a launcher, but that gives the same results.

I use both Ubuntu 11.10 and 12.04, and both work well with the code downloaded from the Arduino site.

The blink code you are using, is it from a previous version or are you using the blink code from the digital examples included with IDE v1.0.1? There was a file name change in the conversion from IDE v0023 and V1.0. There was a file named WProgram.h, which has been changed to Arduino.h. That could be your challenge. Those files are where all those variable names are defined.

Ok Tim,
I am running the blink sketch that 1.0.1 installed... but maybe I have to get rid of all the older stuff first? I have seen the file arduino.h, but maybe things are like you say, antiquated somehow. Is there an easy command to automate this or do I have to go in and pull weeds by hand, so to speak? The arduino IDE is not "installed", juts unzipped and run. BTW, no sketches will compile, old or new. Like the title says, total breakdown. I just tried unpacking it again, in the home folder... same results.

I must not understand. You say you are running the v1.0.1 blink sketch, then you say everything failed. How did you upload the blink sketch?

How are you running the new download? I navigate to that directory with Nautilus and run that shell script. It should have the IDE version and any modification in the title of the IDE window.

I created a link of that shell script (right mouse click using Nautilus), and moved the link to my desktop. That eliminates all that stuff in between.

Ok, let me try and explain it again. I can open the Arduino IDE, and it looks fine. I open the Blink sketch under File/Examples/Basic/Blink.
It opens up in a new sketch window. THEN, I cannot upload it to the UNO, and yes, I have checked all that. So I tried to just verify the sketch using the verify button. That gives me the errors I posted earlier. So, no upload, errors, no verify, same errors. None of the 20 or 30 sketches I have running on other finished projects will verify, either. There is something missing in the program, I think!

What board do you have selected in the Tools -> Board menu?

I have the UNO selected, the correct com port, baud rate and all that… I don’t think that is even an issue here, but I may be wrong. I am trying to compile a sketch without even having a board connected. It will not work either way. I discovered the problem while trying to upload to the only board I have here at the moment, and which has worked fine previously.