Hey,Im using an adxl335 accelerometer, im using an old version of arduino which does not have a 3.3V pin so im using an external 3V supply to power my sensor.The problem is that when i run the program to light up an led when a tilt is detected, the led lights up, but the accelerometer readings gets boosted whenever the led lights up and gets lowered whenever the led goes low.I get the output:accelerations are x, y, z : 396 391 483//when in stable position and led is ONaccelerations are x, y, z : 396 391 483accelerations are x, y, z : 396 391 483accelerations are x, y, z : 396 391 483accelerations are x, y, z : 351 348 430//it gets lowered when the led turns off while it is still in stable modeaccelerations are x, y, z : 351 348 430accelerations are x, y, z : 351 348 430Please help:

I don't know if your problem comes from your code or your circuit so why not showing both? I suspect you didn't have a correct circuit for the LED, which affects the supply voltage of arduino large enough to affect you but without a circuit picture I can only suspect.

I wired my leds from digital 7,6,5,4,3 to all the led's +ve pin and connected the ground of all leds together to arduino ground.Then for my accelerometer i wired the 5V from my arduino to 3 Si diodes with voltage taken accross a 1K resistor(this forms the 3.3V to power my accelerometer) connected to 3.3V pin of the sensor, ground of sensor to arduino ground and the X-acc,Y-acc,Z-acc pins of the sensor to analog 0,1,2 pins of arduino.......!!Please help.

This description spells a lot of trouble. If you had a newer version of arduino, you would have asked a question:"why is my arduino restarting all the time and USB connect/disconnect sound kept playing?"

Please stop what you're doing. You're hurting your arduino. Take a good picture of your connections and we can give you corrections using the picture and your description.