Altered code to work with BBB, but disabled PWM output.