this is the arduino code controlling head and dcs of ruby