I need Arduino code for reading the sensor and activating a relay.

Job ID: 32346765

Budget: £10 – £20 GBP

I need Arduino code for reading the sensor and activating a relay.

I want to use an 8 bar air compressor.
I use Pressure Transmitter,5VDC Pressure Transducer Sensor. (3 wires, +5v, GND, Signal 0,5v ... 4,5v)
0-10 Bar (min 0 Bar)0.5v - (Max 10 Bar)4.5v analog Output.

I am interested in using an Arduino NANO which, on the analog input, reads from the Pressure Transducer the analog signal which fluctuates between 0.4v to 4.5v and on the output it is 0v (Logic 0) or 5v (Logic 1) depending on the value read by to the sensor, signal with which I want to control a relay.
I want the air compressor motor to start at 4 Bar (5v, Logic 1 output) and stop at 8 Bar (0v, Logic 0 output), a value that I can later adjust by reprogramming.
Related categories: Electronics Arduino