This invention discloses methods and apparatus for providing an ophthalmic lens with a microcontroller and an energy source incorporated within the ophthalmic lens. The energy source is capable of powering the microcontroller included within the ophthalmic lens. In some embodiments, an ophthalmic lens is cast molded from a silicone hydrogel.