Analog buttons for tilt sensor using Arduino

Thanks for the comments.

Waltr, the problem with the accelerometer is that I don’t want to measure the tilt relative to the earth’s surface, but to another plane which is in general not horizontal. But Mee_n_Mac’s idea of using two accelerometers could work for my purpose, thanks a lot for that idea! Two 2-axis accelerometers should do the job if I’m only interested in the relative angle between the normals to the planes defined by there 2 axes, right? Accuracy-wise I think ±1 degree would be okay.

I guess the linear motion pots could also work if I combine them with springs. This one could be what I was initially looking for: http://www.potentiometers.com/pdf/BITC_404.pdf But it’s still quite big and I’m not sure how accurate I could get it. I think the two accelerometer idea is probably best.