The University has hosted the first ever Scottish round of the worldwide First Lego League competition.
The event attracts 12,000 teams worldwide and this was the first time Scottish schools had a chance to compete.
Contestants, aged between 9 and 16, came from Peebles, Fife, the Lothians and Edinburgh.
Teams built and programmed lego robots to carry out “missions” on the theme of “climate connections”.
Pupils programmed Lego robots to tackle challenges such as “studying wildlife” (moving a lego polar bear to a lego ice-sheet), or “burying carbon dioxide” (dropping grey balls into a lego CO2 reservoir).
Teams also had to carry out a project on how climate affects their communities.
The range of skills required fits well with the Curriculum for Excellence.
The event was organised by the FIRST Foundation (For Inspiration and Recognition of Science and Technology).
FIRST is a non-profit organisation that seeks to open children's eyes to the fun and excitement of science and technology.
It also seeks to develop their ability to work in teams and stimulate children's use of creativity in the problem solving process.
The University's School of Informatics provided some of the participating schools with Lego robot kits.
The school also offered to pay the competition entry fees - a package worth about £300 to each school.
Photo credit: Adriana M. Groisman, courtesy of FIRST.