converted some arduino stuff to msp stuff