code modified to resolve pwm-adc issue, code added for joystick