WARNING: This page is about a different car, the 2003 Lexus ES 300. However, it is still accessible from the selected car via links, so may be relevant.
For wiring diagram, see Figure. For diagnosis and repair, see Fig 1.
Fig 1: Diagnosis & Repair Of Throttle/Pedal Position Sensor/Switch