Needing better averaging code for pressure sensor

The remainder I am referring to is the averaging code I have now leaves a decimal.

Supply voltage is 12v and toal current draw on the 7809 is max 300ma. The circuit will not be on for long periods of time anyway but I am good at low current draw.

All voltages are stable when checked with the scope, so my issue is just the pulsating pumps.

Ground and power for the pressure sensor are directly from the Nano.

So with good steady voltage as checked with the scope my only issue is the pumps. I will try the cotton as you suggested.

If I need the code you posted can you tell me how I can implement it into mine? I kinda take it that X would be my value from the pressure sensor code? Just don't understand why it rereads analogread(AO) again.