After we have built the hardware and successfully set up the central server, the next step we should consider is to create some applications on the top of them. The data we will get from the hardware inside the beach ball includes its own acceleration data and proximity data to all other beach balls. Based on the two kinds of data, we are able to create some fun activities with those beach balls. I will take an activity called virus game as an example to illustrate one way to build the application. Virus game is a simple game that we start with all the beach balls whose LED light strips are green, representing the healthy status. Then one of the beach balls switches to red color, which means it is the special one, the virus ball. The player holding the red beach ball should get close to those green beach balls and try to transform them to red beach balls. Those being transform to virus balls have the ability to affect others as well. We further design the game with a middle status between being healthy and being a virus, with the purple color. In the middle status, your beach ball is within the affecting range of some of the virus balls and you have to run away from them in two seconds. Virus Game Animation If we start running the server and all the hardwares inside the beach balls are ready to function, we will get a bunch of data from them, including the id of the ball, acceleration data and proximity data. Then we can define a class called Ball and initialize a Ball object with those data. And there are three different lists for balls, representing three different status of the balls: healthy, affecting and finally being a virus. Initially all the balls should be in the healthy list. Then we randomly pick a ball out from the pool and transform it to be a virus. Apparently we also put it in the virus list. We can update the status of all the balls under a predefined interval. For the balls whose proximity to any virus ball is less than a predefined threshold, we put them to the affecting list immediately, and if they move far away from all the virus balls we transfer them back to healthy list. And those that have been in the affecting list for two seconds will become virus balls. The entire game will restart every five minutes. Or we can add some mechanisms to turn the virus balls back if the player wants. And we have also tried to implement the position graph of the balls, in other words, to find the shape of all the balls’ position from proximity data. We first tried to detect whether three balls were a triangle. At the beginning we thought it was a simple problem, since they were not a triangle only under some rare conditions. But it turned out not to be a simple question even for the triangle detection. Because the proximity data from ball A to ball B was not the same from the one from ball B to ball A, averaging the two data was not a good solution and it was weird that they were not forming a triangle at most time. The real-world data was very noisy, which greatly affected the correctness of the detection algorithm. Finally we did random sampling on the data, which was balancing between false positive and false negative. When there were more balls involved in the detection process, the complexity became much higher. For example, if you want to detect whether the balls form a circle, it is rare that they form a perfect circle and it is hard to make the detection both fast and accurate. So due to time issue, we haven’t continued to further explore how to do it and we encourage readers to try. The graph shown below is how the whole system works. The system first gets lots of data from the sensors and does some analysis on those data. Then according the rules of the active application, the system will control the light of the balls.
And there are tons of things we can build with this platform and we have built some of them. You are welcomed to create the applications that you have interests in with our platform.
Create your own unique website with customizable templates.