Modifying things to get them working on AtMega1284p