Help with software to control some solenoids....

Grumpy_Mike, thank you, I'll try those tutorials, hopefully the light will turn on...

Graynomad, one of us doesn't understand, and to be fair, it's probably me as I'm the one asking for help :slight_smile:

This is how I envisage it's going to work. Re #3.
I don't see the arduino acting on any instant reading as such, rather it is monitoring the height. Let's say I pick a certain height as default, which the pot puts out as 2.5v. As I'm driving, the height is changing, maybe going up to 3.3v, and down to 1.8v. The arduino is seeing the changes but not acting on them until it sees the change has become permanent for a certain period. For example, I've loaded the car and the weight has caused the suspension to drop down. This new height puts out a voltage which is constant. The arduino sees the new constant voltage, and as the pre-determined time period passes (say 5 secs), it acts by switching the solenoid on to raise the suspension back to the default height. When the load is removed, obviously the reverse happens.
This isn't necessary while the vehicle is moving. If my height has changed permanently while I'm moving, I'm in trouble. I'm happy for it to work only while I'm stationery but I think I can work that out when the time comes. My vehicle does have a VSS, and I could possibly tap into it to provide info on speed.

I don't want a pressure based system as it would not be suitable IMO. The pressure in the bags would change as the load changes. By adjusting back to the same pressure as before, the height will change. I want the height as the constant, the pressure is what it needs to be to maintain the height.