Instructions
Plug one end of your PlayStation 3 controller's USB cable into either of the two USB inputs on the front of the console.
Plug the other end of the PlayStation 3 controller's USB cable into the Micro USB input on the top of the controller.
Press the "PS" button in the direct center of the controller. If the lights were flashing on the controller because its battery was dying, the battery will begin to charge, and the flashing lights will stop. If the lights were flashing because you had moved too far away from the console, you will now be within 3 feet of the console and the flashing lights will stop.