Six Feet Apart

In CSAI Mr.Dembo asked us to code something that would tell you if you were six feet apart from a person or not. He asked us to do this because in this coronavirus era we have to stay six feet. So he wanted us to partner up with someone and start coding. I was partnered up with a kid named Aariz. The two of us started off by testing out if we would get the same number from any signal strength. It was the signal strength because a MircoBit can not measure the distance it can only measure the signal strength if you were to figure out the distance. That was our first trial of testing, we had to remember that if someone has their MicroBit six feet apart from you but has some part of the MicroBit covered then it is going to affect the results of what we see on our LEDs of the MicroBit because the radio signal would have to go through your fingers. Another thing that we had to remember was that if someone had their MicroBit six feet away from you but behind them then that would affect the results again because it would have to go through your body. At first, the two of us forgot about those two things and then we switched by only holding the battery wires as close as we can get to the MircoBit. When we switched to this is made it easier because we immediately had the same number. Once we found this out the class was already over so the next time we had to do it again because none of us remembered what the number was when we tested it out. After we figured out the number which was -75 we had to figure out how we were to code it. This is what we have so far. In the “on start” we have a “radio set group 42” because for us to know what number we have on the MicroBits we have to have the same radio group. Underneath that, we have a “radio set transmit power 7” we have that block because we wanted to have the strongest transmit power the two MircroBits. Then I put a “radio send number received packet signal strength” because I want it to send the signal strength between Aariz and me. I have another set that is called “on radio received received number”  and in that set, I put a “show number received packet signal strength” because once Aariz’s MicroBit receives the signal strength I want it to show the number that is in between us. That was the code to see how much was six feet. Now we had to figure out how to have the MicroBit to show when we are six feet and when we are not six feet. The first thing that the two of us knew was that we had to use an “if…then…” so we dragged out an “if…then…” statement with “received packet received number (greater than or equal sign)  -75″ because if the signal strength between Aariz and I is less than -75 we want the MicroBit to show that we need to move back until we get to six feet. But in order to show that the two of us wanted the MircoBit to show an icon and so we but a frown when we are not six feet. Now we wanted the MircoBit to show when Aariz and I are six feet apart from each other. So we had to use another “if…then…” statement with “received packet received number (less than or equal to sign) -75″ because if the signal strength between the two of us is greater than or equal to -75 then we want it to show that we are six feet or more than six feet and again Aariz and I wanted to have the MicroBit to show an icon and the icon was a smile. So now we have the code but then we have to test it out. The last part of our code was the put the ” radio send number received packet signal strength” We went to go test it out but my MicroBit would show something different than my partner Aariz. My MicroBit would show a frown when his MicroBit would show a smile but then the signal strength between the two of us was greater than six feet. Aariz’s Microbit was accurate when mine was not so I asked him if I could download the that he had to mine. Even though we had the exact same code it did not work. I downloaded his code to my MicroBit but his MicroBit was still correct when mine was not. By this time Mr.Dembo asked the class the gather for a competition to see whose MicroBit was the most accurate. The first round went and then the second I was in the second round. To my surprise, Aariz and I were exactly six feet apart from each other when Aariz’s MicroBit changed to a frown.

You can find our code below.

By November 15, 2020.  No Comments on Six Feet Apart  Uncategorized   

Leave a Reply

Your email address will not be published. Required fields are marked *