Project 3: Use two microbits to help you keep your distance

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • Day 3 of Stay In and Make/Do - Build a gadget to help you with social distancing.
    #StayHome 🏠😷 #WithMe #Microbit
    We're all meant to be "social distancing", but it's surprisingly hard to judge how far away the recommended 2 metres is. You don't need to carry a tape measure with you - program two microbits to communicate via radio and you can use the signal strength to approximate the distance between them.
    Stay in and Make/Do is my series of daily projects to keep you entertained while you're staying at home. They're mainly electronics projects using the BBC Micro:bit (an affordable and easy to obtain little micro controller you can program in a really simple way), and these projects are suitable for all ages and ability levels - whether or not you've ever written code before or programmed anything!
    ⚙️🔨 YOU WILL NEED 🔨⚙️
    🔷 2 Microbits and battery packs
    (As an Amazon Associate I earn from qualifying purchases made with these affiliate links, but it doesn't cost you any extra 👍)
    UK: amzn.to/3p7q7EL
    US: amzn.to/3jEvkmd
    🔷 USB cable (for programming the Microbit)
    🎥🎞️ OTHER VIDEOS IN THE SERIES 🎞️🎥
    0️⃣ Introduction - • Stay In And Make/Do - ...
    1️⃣ Project 1 - • Project 1: Microbit Fa...
    2️⃣ Project 2 - • Project 2: Build your ...
    3️⃣ Project 3 - • Project 3: Use two mic...
    4️⃣ Project 4 - • Project 4: Make a Toil...
    5️⃣ Project 5 - • Project 5: DIY remote ...
    6️⃣ Project 6 - • Project 6: Automatic H...
    7️⃣ Project 7 - • Project 7: Make micro...
    8️⃣ Project 8 - • Project 8: Make a musi...
    9️⃣ Project 9 - • Project 9: How to run ...
    🔟 Project 10 - • Project 10: Build a mo...
    💻⌨️ LINKS TO CODE ⌨️💻
    Want to see my working? Download a version of my code to play with and investigate.
    Find it here: makecode.microbit.org/_MiPRk9...
    🤖✨Join me elsewhere on the internet ✨🤖
    ➡️Twitter: / hannahmakes
    ➡️Website: www.hannahmakes.com
    ➡️Enquiries hello@hannahmakes.com
    🤖✨SUPPORT ME ON PATREON✨🤖
    ➡️ / hannahmakes

Komentáře • 57

  • @jovan3500
    @jovan3500 Před 2 lety +1

    Thank you so much, I was doing a project similar to this, but is not making much progress until I found this video!

  • @athotasrividya7457
    @athotasrividya7457 Před 3 lety +2

    Thank you so much. It helped me a lot and made me to understand about micro bit .

  • @belinda6014
    @belinda6014 Před 4 lety +2

    your explanation was clear and concise!!:D keep it up

  • @danishcookie2580
    @danishcookie2580 Před 4 lety +1

    Thank you! Helped me a lot with my project.

  • @emersonmarreiros3840
    @emersonmarreiros3840 Před 4 lety

    Great Project!

  • @claudiarizzo1593
    @claudiarizzo1593 Před 4 lety

    LOVE IT :)

  • @anabelletheyoungchangemake8403

    Thanks a lot! You helped me a lot with my project too

  • @petarblagojevic8728
    @petarblagojevic8728 Před 3 lety +2

    That was fun

  • @sharmilalakshmanan8670

    thanks u help me too

  • @enzoliwag4948
    @enzoliwag4948 Před 3 lety +1

    very interesting project

  • @sofiagomez1190
    @sofiagomez1190 Před 3 lety +2

    if I fail my project i'm suing, but it if I don't thanks for you help:))

  • @claire.4136
    @claire.4136 Před 3 lety

    i have to make a project for school and it using this video but i have to make a diagram showing that is works but i can’t make a 6ft long cardboard classroom, so what numbers can i use to make the radio signal weaker so it the x goes away when your like 3 inches apart

  • @clicksandbeeps61
    @clicksandbeeps61 Před 3 lety +2

    Thanks! I replaced the 2 metre code with a message that days how far away you are -in metres- from a friend.

  • @actuallyavailable
    @actuallyavailable Před 4 lety

    Thx helped me

  • @renatahanifah644
    @renatahanifah644 Před 3 lety +2

    how to check the signal strength that is suitable for us?

  • @chainenaimslama1870
    @chainenaimslama1870 Před 3 lety +1

    good

  • @boggynfld
    @boggynfld Před 3 lety +1

    Awesome. I was looking for this and it seems virtually no one has used the micro bit for this purpose. Question: Since the micro bit is continuously transmitting an RF signal, how much does that affect battery life? For example, could it transmit for about 8 hours (a typical work day) on one set of batteries do you think? Also, have you tried using Bluetooth to detect phones near you (not sure if this is even possible with the micro bit)?

    • @HannahMakes
      @HannahMakes  Před 3 lety +1

      Thanks! I would definitely expect that the battery would hold out for a day - I use my microbits for projects and videos and I've changed the batteries once so far! Switching off the radio function would make the battery last even longer though. As for detecting phones, I'm not an expert in Bluetooth, but the blocks available in the MakeCode editor all rely on pairing the microbit with another device - which would mean the other device would have to consent to the pairing. Plus, from the microbit documentation: "A maximum of 4 devices may be paired with a micro:bit simultaneously (note though that only one paired device may connect to the micro:bit at a time)." So I don't think it would be that viable as an alternative if you were just using MakeCode. However, not knowing so much about bluetooth, I couldn't say categorically whether you could write some code by other means that would do something like that. Interesting thought though!

    • @boggynfld
      @boggynfld Před 3 lety

      @@HannahMakes Thanks for that! The micro bit is new to me and all I see in documentation so far is pairing with other devices/phones. I don't know yet if it can see/detect "raw" Bluetooth data/devices. I will keep digging.

  • @davidpv07
    @davidpv07 Před 4 lety +2

    Hello very good project, Could we add a buzzer or an alarm??????

    • @HannahMakes
      @HannahMakes  Před 4 lety +5

      Absolutely! If you attach a buzzer between microbit's 3v pin and, say, pin p0, then you can add a "set pin p0 to 1" block in the first part of your "if" block, and a "set pin p0 to 0" in the "else" part to trigger the buzzer together with the cross on the screen 👍

    • @urmilsinha4241
      @urmilsinha4241 Před 3 lety

      @@HannahMakes Do you mind displaying this on video? I am really confused :(

  • @karenli9191
    @karenli9191 Před 3 lety

    If I want to detect 1.5 m what signal strength should I set??

    • @HannahMakes
      @HannahMakes  Před 3 lety +1

      I don't know exactly, but you can find out with just a couple of lines of code! Here's some instructions I left for another commenter: Write a program that make one microbit transmit some data to another (the data can be anything you like, maybe just a number). Next, write a some code for the other microbit to make it display on screen the signal strength of the messages it receives. (Use a "received packet signal strength" block from the radio menu.) Then, place the two microbits 1.5m apart. The screen of the second microbit will display the signal strength at that distance :) Hope this helps!

  • @girishanth3
    @girishanth3 Před 3 lety

    Hello. A simple and great.
    Can anyone say, would it give upto 360° or atleast 180°? And Shall we attach any sensors along with the radio communication code? Please

    • @HannahMakes
      @HannahMakes  Před 3 lety +1

      Hi! I'm not sure what you mean by "up to 360º" - the radio signal goes in all directions, so it shouldn't matter which microbit is on the left and which is on the right, for example. And you don't need any extra sensors - the microbits are figuring out the approximate distance based only on the radio signal they're sending each other.

  • @user-tg8wj2lg2g
    @user-tg8wj2lg2g Před 3 lety +1

    Hello do you use the same code for both microbits just download onto the two of them?

    • @HannahMakes
      @HannahMakes  Před 3 lety +1

      Exactly that! Just download the code onto one microbit, then download the same code onto a second microbit

    • @user-tg8wj2lg2g
      @user-tg8wj2lg2g Před 3 lety

      @@HannahMakes thank you so muc

  • @meya09
    @meya09 Před 3 lety +1

    how to make it wireless,i'm still new for micro bit explore

  • @triplea8259
    @triplea8259 Před 3 lety +1

    Hello my code works and i have a question.The received packet signal strength -65 it is 2.5 m but it need to be 1.5 m.Any idea about the received packet signal strength to be in 1.5 m.Thanks!

    • @HannahMakes
      @HannahMakes  Před 3 lety +1

      I couldn't guess off the top of my head, but I can tell you a fun way to check :) Write a couple of lines of code to make one microbit transmit data to another. Next, write a couple of lines of code for the other microbit to make it display on screen the signal strength of the messages it receives. (Use a "received packet signal strength" block at the bottom of the radio menu.) Then, place the two microbits 1.5m apart. The screen of the second microbit will display the signal strength at that distance :) Hope this helps!

    • @triplea8259
      @triplea8259 Před 3 lety +1

      @@HannahMakes No worries bc I did it and it is -55 thanks for your code :)

    • @HannahMakes
      @HannahMakes  Před 3 lety

      @@triplea8259 Awesome :)

  • @umesha5104
    @umesha5104 Před 2 lety

    Very interesting video.can you help me to make a social distence maintaining device by using this device.just for my university works.thank you.plz reply

  • @agussofian8122
    @agussofian8122 Před 3 lety +1

    Great idea..
    Can we use this code for 100 micro:bit or more?
    I want all my colleagues use this device for social distancing..

    • @HannahMakes
      @HannahMakes  Před 3 lety

      Great question! There's no theoretical limit on the number of microbits you could use this on, but in practice, with large numbers of devices in a situation with other radio interference, I don't know how well it would work. Best to have a backup option!

  • @momodlozy6447
    @momodlozy6447 Před 3 lety +2

    thank you for helping me for my school project hahaha

  • @brawlwithlinx5567
    @brawlwithlinx5567 Před 3 lety +1

    why not use a ultrasonic sensor

    • @HannahMakes
      @HannahMakes  Před 3 lety

      Because that's more complicated ;) I wanted this project to be as simple as possible. Ultrasonic sensors would be really interesting, but they'd also tell you when you were 2 metres away from furniture rather than people, which could get annoying. The two microbits are only listening out for each other :)

    • @boggynfld
      @boggynfld Před 3 lety

      @@HannahMakes Yes, with ultrasonic it would detect many objects besides people/other micro bits. Radio signal is the way to go I think!