how to filter signal by arduino please?

kindly, i have analog signal input to arduino with noise ...i want to make low pass filter with cut off frequency 9 Hz...using arduino mega 2560...i need some help please

A low pass filter has nothing to do with the Arduino hardware or software.

You're probably going to be most interested in the section named "Passive electronic realization".

You can make a digital filter but before you do you have to know what sampling rate you are going to use and build an anti aliasing filter before you get to digitise the signal. The sampling rate will be governed by how high the frequencies are in the input signal. You then have to decide what order of filter you want based on the attenuation you require at 9Hz. Then writing the code is relatively simple you implement the polynomial function in the form:-
output sample Y, input sample X
Yn = AXn + BXn-1 + CXn-2 ....
Where A, B and C are numbers from your filter design and Xn is the current input sample, Xn-1 is the one before the current sample and so on.
This is called a non recursive filter. A recursive filter would be similar but would also have terms of DYn-1 and EYn-2 and so on in the filter.

Then at the output end you need a hardware restoration filter to remove the sampling noise.

Or a couple of big caps and some equally big resistors or look in an active filter book (cookbook) you could use the default values but it would be better to scale them by a factor of 10 and use a good op-amp. Most cookbook design tables are calculated for a 1Hz response whether high, low, [band] pass or stop and all the rest is a choice of topology and # of sections...
Or you could use the National Semiconductor Webench online filter designer
If you had taken the time to organize and analyze your project you would have understood that a simple web search would have told you all that I just did and at your convenience too, Not mine...

Doc

You can make a digital filter but before you do you have to know what sampling rate you are going to use and build an anti aliasing filter before you get to digitise the signal. The sampling rate will be governed by how high the frequencies are in the input signal. You then have to decide what order of filter you want based on the attenuation you require at 9Hz. Then writing the code is relatively simple you implement the polynomial function in the form:-
output sample Y, input sample X
Yn = AXn + BXn-1 + CXn-2 ....
Where A, B and C are numbers from your filter design and Xn is the current input sample, Xn-1 is the one before the current sample and so on.
This is called a non recursive filter. A recursive filter would be similar but would also have terms of DYn-1 and EYn-2 and so on in the filter.

Then at the output end you need a hardware restoration filter to remove the sampling noise.

WTF?????

Have a read of this thread started by someone called Grumpy_Mike:

http://forum.arduino.cc/index.php?topic=126525.0

Especially post #10 (and #11).

WTF?????

It answers the question. You can write a whole book about digital filters it is a complex subject. In the light of the rather incomplete I now await the supplemental information from the OP. I think it is better than answer #1
I don't see you rushing to answer the question.

I don't see you rushing to answer the question.

No, its beyond my expertise and, as you mention, is a complex topic.
Also, by the time I viewed the thread, some more authoritative replies had been given.

However your reply seemed intimidatingly complex where others have suggested looking up simple passive filters such as RC.

We'll see if dany151 returns.