Well I jumped in the deep end with this one.
I am trying to write a program for a proof of concept for an air ride controller to be put in a vehicle.
I want the first button to control between 2 different operational modes; the first one being a potentiometer, the second being preset values being selected by different buttons.
These will use IR distance meters to monitor the distance from the frame to the axle and control valves to open or release air from the air bags.
For the proof of concept I setup a circuit with LED’s that represent the air bags and photo cells for the IR distance sensors.
I have never done any coding like this before and I am fairly lost, I have done a lot of the exercises that I can find online but to no avail to help me figure this out.
Most of the trouble for me seems to be with the 3 preset value buttons, I want an interlock so that if two or more are pushed it will ignore the all but the first one pushed. Also mapping the buttons to set the brightness of the LED’s.
I will try and attach a file of the circuit in case that helps or if anyone has suggestions of an easier or better way for the hardware to be set up, although it will probably look like a jumbled mess.