Flat, square and fingertip-sized, a microcontroller doesn't look much like a brain—but it certainly acts like one.