One of the areas that I passed over in the first volume of A Gentle Introduction to Robotics was the use of the infrared transmitter/receiver that is on the mBot. My original plan was to use it to facilitate inter-mBot communication so that at some point I could demonstrate simple swarm robotics. However, I ran into too many issues via mBlock (which have apparently been resolved with the current version) and it was preventing me from completing the book so I dropped that chapter with the intention of addressing those devices in the second volume of the series which focuses on native programming in the Arduino environment. While there are innumerable ways to make use of inter-mBot communications, I'll present a short video below of one mBot changing the color of its LEDs and sending the color to another mBot so that the other mBot can match colors with the first.
[Originally published on Robotic Ramblings]