file .pde

Hi, my problem is I 'm starting to use an Arduino Mega 2560 and i want to connect to an accelerometer ADXL 345, so on page accelerometer I found the code to program , but it´s a .pde file, and will not let me open it, , it is for the type of Arduino connected or have something wrong ?. :confused:

What file?

it´s a .pde file, and will not let me open it

What won't let you open it? What message do you get?

How to use this forum

Try renaming it to .ino

http://sparkfun.com/tutorial/ADXL/ADXL345_Basic.pde I want to open that file , but to download it , I get internet and open with others, I put now open with notepad , and code stay all together, i can not understand it .

I downloaded it to desktop. No problems.
Opened it. It said it needs to be inside a folder. Did that.
Then it just opened and loaded into the IDE.
??
I assume you have the Arduino IDE installed, and not just trying to look at it in Notepad.
Because notepad will display everything in a big block of gibberish.
Leo..

First Google is your friend... Got it?
Second there is an application called Notepad++It can display MANY languages in properly formatted lines of code.
Get it, it's free and worth a lot more time than it takes to install it and use it
Third, had you installed the IDE as per the available instructions? A PDE file is from the pre 1.0 IDE and that the later 1.0 IDE knows how to load a .PDE file.
Using the Notepad tool you need only change one line for another... Instead of Wprogram.h substitute Arduino.h
It will be found in the header file for the C\C++ sketch file you are trying to use...
ie In the header file
change the above lines from:
#if ARDUINO < 100
#include <WProgram.h>
#else
#include <Arduino.h>
#endif

to this:
Arduino.h

#if ARDUINO < 100
#include <WProgram.h>
#else
#include <Arduino.h>
#endif

Either method will work bit it's much easier to delete the struck lines as in the first example...

You will now have some new errors but I'm sure that you can figure out the rest from the compiler error messages... AND MR Google...
Or you "Could have started searching the forum for answers First"...
Much faster answers... ~.25 seconds or less typically...

...