This exploratory project is designed to study the feasibility, efficacy and certain mechanisms of the proposed method of "wireless" TEA in patients with gastroparesis. Firstly the feasibility of the chronic use the proposed micro-stimulator will be studied. Secondly, the efficacy of the TEA in improving delayed gastric emptying and symptoms of gastroparesis will be investigated in a double-blinded crossover design in patients with diabetic or idiopathic gastroparesis. Thirdly, possible mechanisms involving pathogeneses of gastroparesis with TEA will be investigated.