I want to use an Arduino setup using an accelerometer to detect when a surface is level. I need the accelerometer to give feedback to the Arduino in order to give an output (light up LEDs, produce a sound) when the x or z value is within a certain range. What setup should I use to make this happen? Which products should I look into?
I think an accelerometer might be hard to use in this application. An accelerometer, even when it's not moving at all, is subject to spurious "noise" inputs, and since it uses these inputs to nominally change its tilt or position by a little, successive spurious readings will build up a false motion, even though it is really going nowhere. So you could get false alarms.
I don't know how close to "level" you must remain for your application, but you might check out tilt switches. Two of them, placed at right angles, would let you know if your platform had been tilted.
I think an accelerometer would work fine as a level. With a bit of averaging the output can be very stable.
MPU6050 boards can be had on ebay for a few dollars. Lots of accelerometers are 3-axis version so a single sensor is all you need.