refactoring the rpi software. make sure rotate works.