Various embodiments are described herein for a device and method for an ingestible medical device with a rotatable element. In some described embodiments, the ingestible medical device includes a storage sub- unit with multiple chambers each having an opening for collecting or dispensing substances from the G1 tract. The device further comprises a chamber enclosure with an access port. One of the chamber enclosure and the storage sub-unit are rotatable to allow for aligning the access port with a chamber opening. The ingestible medical device includes a sensor for positioning the access port of the chamber enclosure or the storage sub-unit as one of these elements rotates.