Here’s a really cool DIY that shows you how to make a tilt measuring inclinometer. I do highly like how Nicholas Kwan didn’t use an accelerometer but used cheaper, basic circuit parts. This could be the “alternative” way to put an accelerometer function in your projects without spending much money but with a LM555 timer chip.
The idea behind this was to design a capacitor using a petri-dish and aluminum foil covering half the petri-dish and using water as the dielectric. Because the capacitor had only half the water to fill it and only half of petri dish had aluminum, the capacitance across the capacitor would be different with different angles. When the dielectric between the capacitor plates is 100% water, the inclinometer’s angle is treated as zero degrees. When none of the water is between the plates and is all of it is between the plastic sides, then it is considered to be at 180 degrees. The capacitance is used by a LM 555 Astable circuit, which in turns generates a frequency for the microprocessor. The microprocessor measures the frequency in Hertz, converts it to an angle in degrees through a pre-generated lookup table arrived at experimentally, then displays it on a 4-digit 7-segment display.