Changed the rs232 code to run on OSX.