EMG-based hand gesture recognition with flexible analog front end