The microneedle devices disclosed herein in some embodiments include a substrate one or more microneedles and, optionally, a reservoir for delivery of drugs or collection of analyte, as well as pump(s), sensor(s), and/or microprocessor(s) to control the interaction of the foregoing.