Code for swarming behavior?


Hi all,

I’m an artist working with robots as a medium, and I’m interested in using Ringo bots for a swarming project. Has anyone used the robots for swarming? If so, can you share your insights on how you achieved swarming functionality? If not, can you recommend a starting point for me?

Here are some ideas that I had:

  1. I was wondering about the idea of using the ambient light sensors to detect other bots in the vicinity (who are themselves emitting light from the NeoPixels) but I’m not sure if that will work, as I think the ambient light sensors pick up on IR, not the visible spectrum.

  2. I was also wondering about using the sensor (I’m not sure which one it is) that detects an object in front of it (which allows the bot to stop before hitting something). If these sensors can sense 360-degrees around the bot, and not just in front, then this might work. But if it’s using IR then I imagine one would run into signal jamming problems with multiple robots sending out signals simultaneously.

  3. Lastly I was wondering about the ‘Bot to Bot wireless communication for swarming’ which is listed on the website here: .However, I’m not sure what component is being used for the wireless communication, and I’m concerned about signal jamming issues there as well.

Any thoughts?



I have also looked into swarming robots. I saw some YouTube videos where robots were swarming in a small area, but the more I researched the more I realized that the technology they were using was VERY expensive. So, how do you do it cheaper?

GPS modules usable by an Arduino are cheap, I have a couple but have not used them yet. My goal, when I do use them, will be to make a robot car (like the little smart car kits with four wheels) that will follow me down the road as I take a walk, or return to a pre-set location as sensed by the GPS unit. I would do this by having a unit in my pocket that constantly read my GPS location and transmitted it to the car via NRF24L01 radios. Then the car would seek to navigate close to that location.

The trouble is that GPS has a low resolution, not suitable in your living room, where GPS access might also be spotty. How do you have each of a number of vehicles know where each of the others is?

One solution might be a new robot (are you listening Mr. Low Voltage Labs?) This robot would have four, six, or eight IR receivers on top of it, so that if a message was sent from another robot, you could tell the general direction of that robot. If each robot included an ID in its message you would be able to tell which direction each robot was in. Have the robots send their messages at large but random intervals to avoid collisions in communications. With some clever programming you could then get the robots to line up, say, in a grid pattern, but since you don’t know distance so the size of that grid might be any size.

To solve the distance problem (again with clever programming) you could include a compass module on each robot, so that they could (hopefully) orient themselves to magnetic north. Then they could begin to triangulate with each other and estimate distances.

It sounds like a lot of work for a single Arduino, so multiple Arduinos on a single robot could split the load, or you could look into some of the newer ARM-based Arduinos like Adafruit uses in their Feather product line.


Hi…three characteristics appeal to researchers: robustness, because individuals can be lost without affecting performance; flexibility, because social insect workers are able to respond to changing work needs; and scalability, because a colony’s decentralised organisation is sustainable with 100 workers or 100,000. These characteristics could be especially useful for doing jobs such as environmental monitoring, which requires coverage of huge, varied and sometimes hazardous areas.