Write and test first, then buy the hardware you need.
Mayo Clinic's Engineering & Therapeutics in Gastrointestinal Disease Lab is implementing microrobotics in the gastrointestinal tract using a swallowable, remote-controlled robotic capsule.