adxl3xx example in IDE

I've got a question about one of the examples in the IDE.

For the adxl3xx it has supply maximum voltage of 3.6V. However, in the IDE it says this

// Provide ground and power by using the analog inputs as normal // digital pins. This makes it possible to directly connect the // breakout board to the Arduino. If you use the normal 5V and // GND pins on the Arduino, you can remove these lines.

Is this example safe? It works but right now I refrain from using it for long periods.

Which ADXL3xx accelerometer do you have? The one that Sparkfun sells ( has this on the data sheet:

Wide supply voltage range: 2.4 V to 5.25 V

I have the adxl335 at the sparkfun page it says

There is no on-board regulation, provided power should be between 1.8 and 3.6VDC.

It's likely i've damaged mine right?

It's likely i've damaged mine right?

You haven't done it any favors. It's not difficult to create a voltage divider, using 2 resistors so that the device can be powered by a digital pin.

pin (5V) --> R1 -+-> R2 --> gnd | adxl3xx

If R1 is ~3K and R2 is ~6K, the voltage to the adxl3xx will be ~3.67V. Make R1 a little larger or R2 a little smaller to drop the voltage going to the accelerometer. Measure with a voltmeter to be certain. Compute the current flow for you resistors to be sure that you don't exceed the current capabilities of the digital pin (40mA max; 20mA recommended). Make sure the resistors can handle the current flow, too.

When I first used the accelerometer I used the 3.3v output and tied Aref to 3.3v as well and that worked fine.

I then noticed the adxl3xx example in the ide and saw that you could slot the board into the 6 analog pins directly and naively thought the example was safe. "adxl3xx" is misleading.