Hello, I am new to Arduino projects and am looking to build a machine that is supposed to rise to a certian entered height.
My plan was to us an HC-SR04 untrasonic sensor to get a simple height reading and use that as an error signal to adjust a pwm for the brushed motor.
I have gotten a sample code to work getting readings from the ultrasonic sensor. But I am not sure how to proceed building a black diagram to generate the required tast.
I have attached a basic rendering of my assembly to give you a better idea of what i am trying to do.