Code to drive Moteinos