What year did Francis Scott Key's poem adopted as your national anthem?

It was made official in 1931.