I had a similar situation not to long ago and thanks to Cadillackid I not only
learned how the system works but also fixed my problem.
Take a look at posts #11 and #17 of
this thread that I started. You will find 2 PDF files that will help you understand some more.
Basically the 2 circuits within the pedal sensor, one is a potentiometer that will send a reference voltage depending on the pedal movement to the ECU. This reference voltage is how the computer knows when to speed up the engine.
you can test this function with an ohmeter.
the second circuit is basically a hall effect sensor or basically an ON/Off switch. when you step on the pedal this circuit signals the ECU that it is ok to speed up the engine.
You cannot test the hall effect with an ohmmeter but you can test with an oscilliscope.
Easiest way to test if it is your sensor or not is to swap it out with another known good unit, from another vehicle with a similar engine as yours. don't worry too much about the model year, this is only a test.
Your not gonna find an OEM replacement cheap but remember this, all these sensors come from china or taiwan anyways!
You can buy a DORMAN replacement but they are very costly and forget about going to the dealer.
In that thread I posted I believe I listed the source where I got mine real cheap, even bought an extra to carry as a spare.
You can also just start the bus and starting from the ECU, wiggle/firmly tap the wiring harness and follow it back best you can to the pedal.
From what you posted I am inclined to think yours night be a loose connection or wires rubbing/chafing somewhere along that harness.