(continued from last post)
after you type cd RetroPie-Setup
type:
./retropie_setup.sh
this will bring up a menu and you should select Update RetroPie Setup Script
when that is complete select SETUP(only if you have …)
then select Register controller for RetroArch emulator
with your keyboard and USB controller connected follow the prompts to setup your controller
Reboot the raspberry pi and configure the controllers within emulation station.
I only did this for one controller and it worked for both within the NES emulator.
Hope this helps.