Convert string into a int

Here is everything you need to know: Serial Input Basics - updated - Introductory Tutorials - Arduino Forum