Passing char to a function

It's marginally dirty though because it requires a couple of globals that would be better avoided. Of course, in a small Arduino program, it doesn't really matter.