A method is provided for treating a subject. The method includes
administering to the subject an ingestible capsule containing one or more
flexible support elements adapted to expand while in a stomach of the
subject, thereby bringing a plurality of electrodes into contact with a
wall of the stomach. The method also includes driving the electrodes to
apply an electrical signal to the stomach wall at first and second times,
the second time at last 24 hours after the first time. Other embodiments
are also described.