I want to do stuff, but only when my car is standing still and is level.

I want to change an output, but only while my car is standing still and is level.

I am thinking a gyro and accelerometer might du the trick, but something tells me that a gyro is overkill/the wrong item for this. Is these some other sensor that will check if something is level?

Session:
I want to change an output, but only while my car is standing still and is level.

I am thinking a gyro and accelerometer might du the trick, but something tells me that a gyro is overkill/the wrong item for this. Is these some other sensor that will check if something is level?

Tilt Switch?

You need to define level.
Are we talking about sprit level level here?
Stationary car might be harder than you think anyway. I can't see how a gyro or accelerometer is going to help with this one.

There are also rotary encoders that can be fitted to speedometer cables to check that the car is not in motion. Or alternatively the work may have been done already in the form of an electronic speedometer fitted to the car already.

Wind Power sensors like the ones used in autonomous quad-copters or planes , I think they might work . However rogue wind would still be a problem .

Hi, does the motor have to be running, the ignition switch will tell you if you have stopped, or auto gearbox in Park, or handbrake on.

Tom.... :slight_smile:

Wow, great response here.

I see that explaining more in detail will help.

I have a car with air suspension. This means that the height of the car can be adjusted.

From the body of the car to the wheel there is a sensor (same type that auto adjust the height of the lights on modern cars). There is one sensor on each wheel.

When the car is sitting level you will set a height you want to ride at.

When driving the car for a period of time some air might leak out of the bags, more people might get in the car and so on.

Each 15 minutes I will have the arduino check if:

The car is not breaking or accelerating (make the front of the car go up or down).
Is level.

So for example, after 15 minutes the arduino knows that the next time the car is standing still and is level (resonable) it will check if the car is still at the preset height and make adjustment to correct if the height is wrong.

The way is does this is by opening air solenoids that let air in to the bags at each corner.

There is a commercial system that does this. It is called Accuair E-level. That system also does this while driving, but this would create the need for smoothing of the signals coming from the height sensors and only makes this overly complicated. An adjustment each 15 minutes is more than enough.

Hope I am able to explain ok, my first language is not english.