Can I use the FFT to recognize musical notes on a piano?
The concept is good, but you will find it is not so simple in practice. 

Pitch is not simply the predominant tone, so there's problem number 1.

The FFT frequency bins can't hit all (or even multiple) tones of the musical scale simultaneously.

I would suggest playing with an audio program (for example, Audacity) that includes an FFT analyser and tone generator to get a feel for what it can (and can't) do before you try to implement a particular task using the FFT.

If you need to detect just a few specific tones, you may find the Goertzel algorithm to be easier and faster. 

Pitch detection is complicated, and there is still research going on in that field.  Tone detection is pretty straight forward, but may not get you what you want.