Hi Fred,
Unfortunately 5 beeps is usually an indication that the controller has failed.
If you leave the battery turned off and also disconnect the three thick phase wires
(Yellow, Green and Blue) from the controller, you should find that the bike will be a lot easier to ride
(without the trembling, shaking and heavy braking effect that you have already experienced), proving that the controller is at fault.
Fortunately this is much easier to do with an external controller!
As your Pie is still be within warranty, you will need to contact the original supplier to request a replacement controller.
Email tom@goldenmotor.com if it was purchased direct from China.
Let us know what happens.
Alan