GlobalFoundries, the semiconductor manufacturer in Essex Junction, hosted a Lego robot competition for elementary school students for the first time.