Cleaned up Beaglebone sensors/actuators/PWM code

Moved some tasks into separate methods