Merge pull request #6 from beanz/arduino

Pull Mark's Changes
Merge pull request #7 from beanz/arduino

Pull Mark's new patterns
Make it compile on gcc-msp430 and arduino