Added casts to the write calls

The IDE wouldn't compile otherwise...
Merge pull request #47 from CMU-Robotics-Club/vrbahl

Added casts to the write calls