< Return to Video

Global pre-recorded event: biodiversity counter code-along

  • 0:07 - 0:10
    [Music]
  • 0:24 - 0:30
    [Music]
  • 0:38 - 0:41
    hello and welcome to our BBC microbic
  • 0:41 - 0:44
    Global codal my name is Giles and my
  • 0:44 - 0:46
    name is blaed and we are part of the
  • 0:46 - 0:48
    Education team here at the microbit
  • 0:48 - 0:51
    Educational Foundation now does anyone
  • 0:51 - 0:55
    know the theme of today's Cod along here
  • 0:55 - 0:58
    are a few
  • 0:58 - 1:02
    Clues there a butterfly
  • 1:02 - 1:06
    F uh oh okay that looks like some
  • 1:06 - 1:10
    flowers well that's definitely a
  • 1:11 - 1:15
    tree oh my goodness a very large Robin a
  • 1:15 - 1:17
    very large
  • 1:17 - 1:20
    bird so well done anyone watching if you
  • 1:20 - 1:23
    have shouted out the theme is
  • 1:23 - 1:26
    biodiversity happy International Day for
  • 1:26 - 1:29
    biological diversity um or International
  • 1:29 - 1:31
    Day for bio biodiversity as it can be
  • 1:31 - 1:35
    shortened to the United Nations theme uh
  • 1:35 - 1:37
    this year is all about building back
  • 1:37 - 1:40
    biodiversity because we all depend on a
  • 1:40 - 1:46
    wide variety of plants and animals and
  • 1:46 - 1:49
    microorganisms to keep us all healthy
  • 1:49 - 1:52
    and thriving so in today's codal along
  • 1:52 - 1:55
    you are going to be doing your bit as
  • 1:55 - 1:56
    well because you are going to be
  • 1:56 - 1:59
    building back bio biodiversity too by
  • 1:59 - 2:02
    creating a bi biodiversity counter that
  • 2:02 - 2:04
    can be used in your school playground or
  • 2:04 - 2:06
    any other outdoor area you have near
  • 2:06 - 2:10
    your school and as today is UN day for
  • 2:10 - 2:13
    biodiversity the plan is to create uh
  • 2:13 - 2:16
    the project in the make code editor but
  • 2:16 - 2:18
    then to transfer the code onto the
  • 2:18 - 2:20
    microbit and use them outside to count
  • 2:20 - 2:22
    the number of species of animals and
  • 2:22 - 2:25
    species of plants that you can spot you
  • 2:25 - 2:27
    don't need a microbit to take part in
  • 2:27 - 2:29
    this session as we will be making good
  • 2:29 - 2:30
    use of the simulator on make code
  • 2:30 - 2:33
    website but if you do have microbits
  • 2:33 - 2:35
    then make sure you have them out ready
  • 2:35 - 2:37
    to put the code on at the end of the
  • 2:37 - 2:39
    session and in today's session we're
  • 2:39 - 2:42
    going to be coding along together make
  • 2:42 - 2:44
    sure that you pause the video whenever
  • 2:44 - 2:46
    you need to and you can replay parts
  • 2:46 - 2:50
    that you need to hear over again I'm
  • 2:50 - 2:51
    really excited that we're coding the
  • 2:51 - 2:53
    biodiversity cter together so students
  • 2:53 - 2:55
    all over the world can see what their
  • 2:55 - 2:59
    local biodiversity is like if you have a
  • 2:59 - 3:01
    school Twitter or X account then make
  • 3:01 - 3:05
    sure you share how you get on you can
  • 3:05 - 3:10
    tag us we are at microbit uncore edu
  • 3:10 - 3:14
    that's microbit uncore edu on Twitter or
  • 3:14 - 3:18
    X that's a really good idea J it will be
  • 3:18 - 3:20
    lovely to see how different classes and
  • 3:20 - 3:23
    schools get on in their environments so
  • 3:23 - 3:25
    I think we're ready to get started Giles
  • 3:25 - 3:27
    can you think of anything else we need
  • 3:27 - 3:29
    to mention before we start coding I
  • 3:29 - 3:32
    think as we're making a species counter
  • 3:32 - 3:33
    I think it would be really good just to
  • 3:33 - 3:35
    make sure that everyone knows exactly
  • 3:35 - 3:39
    what a species is great call Giles okay
  • 3:39 - 3:42
    so a species is a set of animals or
  • 3:42 - 3:45
    plants who have similar characteristics
  • 3:45 - 3:47
    to each other so they all look similar
  • 3:47 - 3:48
    to each other and they have similar
  • 3:48 - 3:51
    characteristics so for
  • 3:51 - 3:53
    example let's look at these pictures
  • 3:53 - 3:56
    here so let me just remove this so that
  • 3:56 - 4:00
    you can see it better there we go so so
  • 4:00 - 4:03
    um in the in the slide here we've got
  • 4:03 - 4:06
    lots of different animals but how many
  • 4:06 - 4:08
    species have we got Giles oh that's a
  • 4:08 - 4:10
    really interesting question it's quite
  • 4:10 - 4:12
    tricky actually um I'm going to start
  • 4:12 - 4:14
    with the ones that all look the same so
  • 4:14 - 4:17
    I can see some snails there um some in
  • 4:17 - 4:20
    their shells some out of their shells so
  • 4:20 - 4:22
    I think the three pictures of snails
  • 4:22 - 4:23
    that's one
  • 4:23 - 4:27
    species um I can see Robin again a bird
  • 4:27 - 4:29
    and I don't see any other birds on there
  • 4:29 - 4:31
    so I think that's probably another
  • 4:31 - 4:36
    species um we've got oh two butterflies
  • 4:36 - 4:39
    so I think two butterflies uh probably
  • 4:39 - 4:43
    one more species and then I can see a
  • 4:43 - 4:47
    fly and I can see a worms so I think
  • 4:47 - 4:50
    have we got five species there blonded
  • 4:50 - 4:53
    well done yes I think that is spot on
  • 4:53 - 4:55
    and that means that everyone is very
  • 4:55 - 4:57
    clear and everyone can be super accurate
  • 4:57 - 4:58
    when they go out and they start logging
  • 4:58 - 5:02
    their species later thanks chares so
  • 5:02 - 5:06
    let's get coding um so the what we're
  • 5:06 - 5:07
    going to do is we're going to bring you
  • 5:07 - 5:10
    to the makecode editor
  • 5:10 - 5:13
    website so um you'll find that you can
  • 5:13 - 5:15
    see it on the banner now at make code.
  • 5:15 - 5:18
    microbit
  • 5:30 - 5:32
    you can get started with right away
  • 5:32 - 5:35
    without needing any logins or passwords
  • 5:35 - 5:36
    and so on so there is a sign-in button
  • 5:36 - 5:38
    on the top right so schools with
  • 5:38 - 5:40
    Microsoft or Google logins can use that
  • 5:40 - 5:42
    but we don't need to we can jump
  • 5:42 - 5:44
    straight in um now I've got some
  • 5:44 - 5:46
    projects showing here because I've used
  • 5:46 - 5:48
    it before if it's your first time you
  • 5:48 - 5:50
    might not have that but you will have
  • 5:50 - 5:52
    new project the new project button and
  • 5:52 - 5:54
    that's what we're going to jump straight
  • 5:54 - 5:57
    into also in the settings on make code
  • 5:57 - 5:59
    in the top right there's a little Cog
  • 5:59 - 6:01
    here next to the sign-in button that's
  • 6:01 - 6:03
    where you'll find different languages if
  • 6:03 - 6:05
    you want to change the language to to
  • 6:05 - 6:09
    your local language so click on new
  • 6:09 - 6:12
    project and the first thing it does is
  • 6:12 - 6:14
    asks me to give it a name so if you're
  • 6:14 - 6:17
    doing the same project as the CL it's a
  • 6:17 - 6:19
    really good idea to make sure that your
  • 6:19 - 6:21
    name or your student name is is is
  • 6:21 - 6:24
    included in the project name and today
  • 6:24 - 6:28
    we're making a biodiversity counter so
  • 6:28 - 6:30
    I'm going to name my project blana
  • 6:30 - 6:34
    biodiversity counter and click on
  • 6:34 - 6:37
    create okay so this has opened up the
  • 6:37 - 6:40
    make code editor so we can see that
  • 6:40 - 6:42
    there's some blocks of code already in
  • 6:42 - 6:43
    the workspace here on the right now I'm
  • 6:43 - 6:45
    going to make that a little bit bigger
  • 6:45 - 6:47
    by using this plus sign in the bottom
  • 6:47 - 6:49
    right hand side going to zoom in on my
  • 6:49 - 6:52
    blocks of code a little bit do you think
  • 6:52 - 6:54
    that's large enough Giles I think so I
  • 6:54 - 6:55
    can see that really clearly thank you
  • 6:55 - 6:58
    blet okay brilliant so um this is the
  • 6:58 - 7:00
    workspace this is where you can draw
  • 7:00 - 7:02
    drag blocks of codee around and you drag
  • 7:02 - 7:04
    them in from the toolbox over here and
  • 7:04 - 7:06
    you build your code in this space now we
  • 7:06 - 7:08
    won't need the forever block for our
  • 7:08 - 7:10
    project today so I'm actually going to
  • 7:10 - 7:11
    show you how to delete the blocks as
  • 7:11 - 7:15
    well by dragging them onto the uh the
  • 7:15 - 7:17
    the menu here or the toolbox and then
  • 7:17 - 7:19
    just letting go and it will delete a
  • 7:19 - 7:22
    block um when you have a look inside
  • 7:22 - 7:24
    this menu you can see that there's lots
  • 7:24 - 7:27
    of pre-prepared blocks of code ready to
  • 7:27 - 7:30
    go you don't need to have to know what
  • 7:30 - 7:32
    to type like you would in a text based
  • 7:32 - 7:35
    um editor you can just take the blocks
  • 7:35 - 7:37
    and you can drag and drop them onto the
  • 7:37 - 7:39
    workspace as you need
  • 7:39 - 7:41
    them um on the left hand side here we've
  • 7:41 - 7:44
    also got the simulator so we'll be using
  • 7:44 - 7:46
    this today to check that everything is
  • 7:46 - 7:49
    working before we put our code on our
  • 7:49 - 7:52
    microbit and take them outside to do our
  • 7:52 - 7:56
    biodiversity logging um we'll also be
  • 7:56 - 7:58
    using the download button we just take
  • 7:58 - 8:00
    off the banner for a second perfect
  • 8:00 - 8:02
    thank you Giles so the download button
  • 8:02 - 8:04
    here bottom left that will be used at
  • 8:04 - 8:07
    the end of the session so that we uh can
  • 8:07 - 8:11
    put our code onto our microbit so we
  • 8:11 - 8:13
    will if I just show you on my screen let
  • 8:13 - 8:17
    me get a view of me on the screen
  • 8:18 - 8:21
    second so on the microbit here we will
  • 8:21 - 8:23
    use the USB lead we will plug that into
  • 8:23 - 8:25
    our computer and we'll plug the other
  • 8:25 - 8:27
    end into our microbit and we will press
  • 8:27 - 8:29
    download and we will put the code on the
  • 8:29 - 8:31
    microbit and then attach the battery
  • 8:31 - 8:33
    pack so that we can bring it outside
  • 8:33 - 8:36
    into the environment and uh code and use
  • 8:36 - 8:40
    the code we have created that way okay
  • 8:40 - 8:43
    so coming back to our project that we're
  • 8:43 - 8:46
    going to create today um I'm going to
  • 8:46 - 8:48
    stop here and have a little think about
  • 8:48 - 8:51
    what my program is going to do I want to
  • 8:51 - 8:55
    use my microbit in the playground ler to
  • 8:55 - 8:57
    count two different things the number of
  • 8:57 - 8:59
    animal species and the number of plant
  • 8:59 - 9:02
    species species I want the microbit to
  • 9:02 - 9:04
    count for me and remember how many of
  • 9:04 - 9:05
    these species I spotted because there's
  • 9:05 - 9:07
    absolutely no way I'm going to keep all
  • 9:07 - 9:10
    that information in my head so I want
  • 9:10 - 9:12
    the microbit to remember the information
  • 9:12 - 9:14
    or the data so that means I need to
  • 9:14 - 9:18
    create two different variables so in the
  • 9:18 - 9:21
    toolbox here we've got variables as a
  • 9:21 - 9:24
    red menu section of the menu so if I
  • 9:24 - 9:27
    click on variables you'll see it gives
  • 9:27 - 9:29
    me one option right now and that is to
  • 9:29 - 9:31
    make a variable able so variables are
  • 9:31 - 9:33
    like containers they will hold different
  • 9:33 - 9:35
    pieces of information and they will keep
  • 9:35 - 9:37
    updating as we use the microbit and add
  • 9:37 - 9:38
    more
  • 9:38 - 9:41
    information so the two uh variables I
  • 9:41 - 9:44
    want to create today are I click on make
  • 9:44 - 9:46
    a variable and then I name them so I'm
  • 9:46 - 9:48
    going to call my first one animal
  • 9:48 - 9:51
    species and click okay and then I'm
  • 9:51 - 9:54
    going to oh you see straight away some
  • 9:54 - 9:56
    Co some blocks of code have appeared
  • 9:56 - 9:58
    because I've created this variable so
  • 9:58 - 9:59
    we've got some other blocks of code here
  • 9:59 - 10:02
    we can use later and then I click on
  • 10:02 - 10:04
    make a variable again and I'm going to
  • 10:04 - 10:06
    call this plant
  • 10:06 - 10:10
    species and click on okay so now I've
  • 10:10 - 10:14
    got options to use these blocks of code
  • 10:14 - 10:18
    to change it from animal to plant when I
  • 10:18 - 10:20
    need it and I've made my two variables
  • 10:20 - 10:22
    if I go back into variables here I can
  • 10:22 - 10:24
    see them sitting here animal species and
  • 10:24 - 10:25
    plant
  • 10:25 - 10:28
    species okay so let me just delete that
  • 10:28 - 10:31
    properly there we go
  • 10:31 - 10:34
    so everyone approaches coding a little
  • 10:34 - 10:36
    bit differently and sometimes there are
  • 10:36 - 10:37
    different ways to achieve the same
  • 10:37 - 10:40
    things so Giles what would you do next
  • 10:40 - 10:42
    now that we've created the variables
  • 10:42 - 10:43
    well I was just thinking about that when
  • 10:43 - 10:46
    I turn on my mic a bit and the program
  • 10:46 - 10:49
    starts I won't have counted any Vari I
  • 10:49 - 10:51
    won't have counted any animal species or
  • 10:51 - 10:54
    plant species yet so I'm thinking
  • 10:54 - 10:57
    whether it's a good idea to set both
  • 10:57 - 11:00
    variables to zero so what I might do is
  • 11:00 - 11:03
    I might go into the variables
  • 11:03 - 11:08
    menu and take set plant species to zero
  • 11:08 - 11:11
    and drag that into the on block anything
  • 11:11 - 11:14
    you put in the onstart block will um the
  • 11:14 - 11:16
    microbit will carry out that instruction
  • 11:16 - 11:18
    when the program starts running so it's
  • 11:18 - 11:20
    going to set the zero uh set the plant
  • 11:20 - 11:22
    species to zero at the start of the
  • 11:22 - 11:26
    program then I drag the same block again
  • 11:26 - 11:29
    so I go back into variables and drag out
  • 11:29 - 11:31
    set plant species to zero again but I'm
  • 11:31 - 11:35
    going to change maybe plant species to
  • 11:35 - 11:36
    animal
  • 11:36 - 11:39
    species so we have plant species and
  • 11:39 - 11:42
    animal species both set to zero at the
  • 11:42 - 11:43
    start of the program do you think that's
  • 11:43 - 11:47
    a good idea blet yes definitely I would
  • 11:47 - 11:48
    I would have done the same thing at this
  • 11:48 - 11:50
    point for sure to make sure that the
  • 11:50 - 11:52
    microbit knows to start counting from
  • 11:52 - 11:55
    zero for each of those variables there's
  • 11:55 - 11:57
    one other thing I do as well um there's
  • 11:57 - 11:59
    nothing on the screen of the microbit
  • 11:59 - 12:01
    when you turn on at the moment and I
  • 12:01 - 12:03
    think it would be useful to also show a
  • 12:03 - 12:05
    zero on the screen so I'm going to add
  • 12:05 - 12:08
    in that instruction I'm going to go into
  • 12:08 - 12:11
    the basic menu so the menus are all
  • 12:11 - 12:13
    colorcoded and blue blocks are from the
  • 12:13 - 12:15
    basic menu I'm going to take the first
  • 12:15 - 12:18
    one here show number and I'm going to
  • 12:18 - 12:21
    drag that in to the onart block here
  • 12:21 - 12:23
    it's already got the number zero in it
  • 12:23 - 12:25
    and now you can see the simulator has
  • 12:25 - 12:28
    updated and when my mic bit starts it
  • 12:28 - 12:32
    will show a zero on the screen as well
  • 12:32 - 12:34
    okay so let's have a quick recap to to
  • 12:34 - 12:36
    make sure that everyone is keeping up
  • 12:36 - 12:38
    when they're coding along in their
  • 12:38 - 12:40
    classrooms so have you made your
  • 12:40 - 12:42
    variables remember we went into
  • 12:42 - 12:44
    variables we clicked make a variable and
  • 12:44 - 12:47
    we made two one called animal species
  • 12:47 - 12:50
    and one called plant species okay have
  • 12:50 - 12:53
    you set your variables to zero we took
  • 12:53 - 12:56
    out this one set plant species to zero
  • 12:56 - 12:57
    and we used it
  • 12:57 - 12:59
    twice but we changed it using the drop
  • 12:59 - 13:01
    down menu from plant species to animal
  • 13:01 - 13:05
    species and we popped that into the
  • 13:05 - 13:08
    onstart block and then we added a zero
  • 13:08 - 13:10
    through using the show Number Block here
  • 13:10 - 13:15
    in the basic menu as well okay
  • 13:15 - 13:17
    so that
  • 13:17 - 13:21
    means we have got started but there's
  • 13:21 - 13:23
    two very important things that we need
  • 13:23 - 13:26
    to do next and they're both to do with
  • 13:26 - 13:28
    using the buttons on the microbit
  • 13:28 - 13:29
    because we're going to be using both
  • 13:29 - 13:33
    button a and button B uh that are on the
  • 13:33 - 13:36
    front of the microbit so we're going to
  • 13:36 - 13:38
    use one button to log data about animal
  • 13:38 - 13:40
    species and we're going to use another
  • 13:40 - 13:42
    button to log the data about plant
  • 13:42 - 13:46
    species so let's start with button a
  • 13:46 - 13:48
    here are a few
  • 13:48 - 13:52
    clues for what we're going to
  • 13:52 - 13:55
    use button a for any
  • 13:55 - 14:00
    ideas well um let me see we had uh a
  • 14:00 - 14:03
    butterfly we've had uh a bird and a
  • 14:03 - 14:07
    snail so I think a is going to be for
  • 14:07 - 14:11
    Animals correct yes A is for Animals is
  • 14:11 - 14:13
    animals that's easy to remember yes so
  • 14:13 - 14:15
    all the pictures are animals so button a
  • 14:15 - 14:18
    is going to lck the animal species so to
  • 14:18 - 14:20
    make something happen on the micob bit
  • 14:20 - 14:22
    when we press button a we will need the
  • 14:22 - 14:25
    on button a press block so you'll find
  • 14:25 - 14:27
    this in a new menu the the purple
  • 14:27 - 14:30
    purpley pink menu here called
  • 14:30 - 14:33
    if I go into that menu the very first
  • 14:33 - 14:35
    block is on button a press so let's pull
  • 14:35 - 14:37
    that out and put that into the
  • 14:37 - 14:41
    workspace okay so we want the animal
  • 14:41 - 14:44
    species uh variable to update by one
  • 14:44 - 14:47
    each time we press button a so that
  • 14:47 - 14:49
    means I need to go back into my
  • 14:49 - 14:53
    variables menu in here and I I'm looking
  • 14:53 - 14:55
    at the second block here I want to
  • 14:55 - 14:58
    change something by one when I press
  • 14:58 - 15:01
    button a now when I pull this out just
  • 15:01 - 15:03
    pop it there for a moment it it goes
  • 15:03 - 15:04
    this strange color because it's not
  • 15:04 - 15:07
    inside uh a working block at the moment
  • 15:07 - 15:09
    but I can still manipulate it here I can
  • 15:09 - 15:11
    still change it to what I want so I
  • 15:11 - 15:13
    actually want to change the animal
  • 15:13 - 15:15
    species on but a so I'm going to switch
  • 15:15 - 15:18
    that to animal species and I pop it
  • 15:18 - 15:22
    inside the on button a pressed block so
  • 15:22 - 15:25
    that means that the microbit will update
  • 15:25 - 15:27
    the total number of animal
  • 15:27 - 15:32
    species each time we press button a uh
  • 15:32 - 15:35
    on the micro bit
  • 15:35 - 15:38
    itself okay Planet I I got a question
  • 15:38 - 15:40
    here I I've been following along I've
  • 15:40 - 15:42
    got the same blocks as you but when I
  • 15:42 - 15:46
    press button a I just get zero on the
  • 15:46 - 15:48
    screen even though I keep pressing
  • 15:48 - 15:51
    button a have I done something wrong not
  • 15:51 - 15:54
    at all Giles um
  • 15:54 - 15:57
    I I have the same thing happening on my
  • 15:57 - 16:00
    mic bit on here so I might be pressing
  • 16:00 - 16:03
    on my simulator I might press butt a a
  • 16:03 - 16:04
    couple of times but my screen has not
  • 16:04 - 16:07
    changed so you have not done anything
  • 16:07 - 16:10
    wrong you just have not given the
  • 16:10 - 16:12
    microbit the instructions to do that
  • 16:12 - 16:16
    part yet okay the micr will only do what
  • 16:16 - 16:18
    you ask it to do if we want to see the
  • 16:18 - 16:21
    total on the LED display then we need to
  • 16:21 - 16:22
    put those instructions in and ask the
  • 16:22 - 16:24
    microbit to show it to us so let's add a
  • 16:24 - 16:26
    few more blocks to make that
  • 16:26 - 16:31
    happen so if we go into to um what are
  • 16:31 - 16:32
    we going to go we're going to go into
  • 16:32 - 16:36
    into basic first of all and we're going
  • 16:36 - 16:39
    to scroll down to the show icon block
  • 16:39 - 16:42
    okay so this will help us know that when
  • 16:42 - 16:45
    it shows us data on the LED display it's
  • 16:45 - 16:49
    talking about animal species data so I'm
  • 16:49 - 16:51
    going to pop that in here and I'm going
  • 16:51 - 16:54
    to change the icon from a heart to
  • 16:54 - 16:55
    something that resembles an animal
  • 16:55 - 16:58
    species so let's have a look got lots of
  • 16:58 - 17:00
    pre-prepared icons here right I'm going
  • 17:00 - 17:03
    to choose the duck so we've got a little
  • 17:03 - 17:07
    duck icon to to stand for our animal
  • 17:07 - 17:10
    species right um the next thing I'm
  • 17:10 - 17:11
    going to do is I'm going to go back into
  • 17:11 - 17:13
    basic and I'm going to take the show
  • 17:13 - 17:15
    number block again and I'm going to pop
  • 17:15 - 17:18
    it in below now this time I don't want
  • 17:18 - 17:21
    to the show Number Block to show us zero
  • 17:21 - 17:23
    I want it to show the total number of
  • 17:23 - 17:26
    animal species on the LED display so
  • 17:26 - 17:29
    I've got to go back into variables and
  • 17:29 - 17:32
    find my animal species block the small
  • 17:32 - 17:34
    one here so I take this out and you can
  • 17:34 - 17:38
    see how it can slot in over the zero and
  • 17:38 - 17:41
    replace it so we do that and then our
  • 17:41 - 17:43
    code will
  • 17:43 - 17:47
    update okay so now if we test if it's
  • 17:47 - 17:49
    working on the simulator it should work
  • 17:49 - 17:51
    this time but actually I've got an idea
  • 17:51 - 17:54
    to test that Giles so do you remember
  • 17:54 - 17:57
    this this slide that we looked at
  • 17:57 - 18:01
    earlier oh yeah was it again how many
  • 18:01 - 18:04
    times I press a if these were the
  • 18:04 - 18:06
    animals I'd seen outside oh gosh right
  • 18:06 - 18:08
    I'm trying to remember again we had
  • 18:08 - 18:11
    snails and uh that was one species and
  • 18:11 - 18:13
    then we had two butterflies but that's
  • 18:13 - 18:15
    only one more species because they're
  • 18:15 - 18:17
    both both the same species so that's one
  • 18:17 - 18:21
    more uh we had a bird and we've got a
  • 18:21 - 18:23
    fly and I've got a worm so I think it
  • 18:23 - 18:26
    was five different animal species that
  • 18:26 - 18:30
    we have there correct well done J yes so
  • 18:30 - 18:33
    on my simulator now I am going to press
  • 18:33 - 18:35
    a five times and let's see if we can see
  • 18:35 - 18:38
    something happening and
  • 18:38 - 18:44
    see yes there we go one two 3
  • 18:44 - 18:47
    4 five so we've now given the correct
  • 18:47 - 18:49
    instructions yeah so we can see now that
  • 18:49 - 18:51
    when we log one it will give us some
  • 18:51 - 18:53
    feedback on the LED display to know that
  • 18:53 - 18:57
    it's happened um so if everyone has got
  • 18:57 - 19:01
    this part coded then that means we are
  • 19:01 - 19:04
    halfway there
  • 19:05 - 19:07
    yay
  • 19:07 - 19:10
    fantastic fantastic so we're halfway
  • 19:10 - 19:13
    there um and we've told the microb bit
  • 19:13 - 19:14
    what to do when we press button a when
  • 19:14 - 19:17
    we're counting animal species but we
  • 19:17 - 19:21
    haven't yet told it what to do when we
  • 19:21 - 19:24
    press button B now I wonder if anyone
  • 19:24 - 19:28
    can remember what are we going to count
  • 19:28 - 19:30
    when we press but button B can anyone
  • 19:30 - 19:32
    remember that
  • 19:32 - 19:36
    I ah right so we've got uh some flowers
  • 19:36 - 19:38
    we've got a
  • 19:38 - 19:44
    tree um oh and some more plants oh is it
  • 19:44 - 19:45
    plant species
  • 19:45 - 19:48
    Jiles might be plant species that we're
  • 19:48 - 19:50
    getting when we press button
  • 19:50 - 19:52
    D so what we want to do is we want to
  • 19:52 - 19:56
    use button B to to log plant species so
  • 19:56 - 20:00
    what we can do now is we can dup at or
  • 20:00 - 20:03
    copy the blocks that we have for button
  • 20:03 - 20:05
    a I wonder bled could you show us how to
  • 20:05 - 20:06
    do
  • 20:06 - 20:08
    that what do you can you just tell us
  • 20:08 - 20:10
    what you're doing there to get that that
  • 20:10 - 20:12
    menu to pop up yeah so I've put my
  • 20:12 - 20:15
    cursor over the entire block on button a
  • 20:15 - 20:18
    pressed and then I've right clicked and
  • 20:18 - 20:20
    then I get the menu at duplicate at the
  • 20:20 - 20:21
    top so you can duplicate that's one way
  • 20:21 - 20:23
    of doing it or you can just fetch the
  • 20:23 - 20:25
    blocks again uh from the toolbox in the
  • 20:25 - 20:27
    middle but just because it's quicker and
  • 20:27 - 20:29
    easier we're going to show you uh how to
  • 20:29 - 20:31
    duplicate so if you click on that and
  • 20:31 - 20:33
    duplicate the block you'll see again
  • 20:33 - 20:34
    like a bit like it did before the blocks
  • 20:34 - 20:37
    have gone a funny color uh and that's
  • 20:37 - 20:40
    because we've got two on button a press
  • 20:40 - 20:42
    blocks and we can only have one uh set
  • 20:42 - 20:44
    of instructions for what to do when you
  • 20:44 - 20:46
    press button a otherwise the microbit
  • 20:46 - 20:48
    will get really confused so first thing
  • 20:48 - 20:51
    we need to do is to change button a to
  • 20:51 - 20:56
    button B okay and then because we're not
  • 20:56 - 20:58
    counting animal species anymore we need
  • 20:58 - 21:01
    to change animal species to plant
  • 21:01 - 21:03
    species and I think it would be a good
  • 21:03 - 21:05
    idea to show a different picture at this
  • 21:05 - 21:07
    point not a duck so we'll pick something
  • 21:07 - 21:10
    else so if you click on that have a look
  • 21:10 - 21:12
    and pick something there is I think
  • 21:12 - 21:14
    there's a fork icon that looks a little
  • 21:14 - 21:17
    bit like a tree that's it that one we
  • 21:17 - 21:20
    can pick that you can also draw your own
  • 21:20 - 21:22
    plant icon as well if you like you can
  • 21:22 - 21:24
    use the show LEDs Block in the basic
  • 21:24 - 21:26
    category and you can draw your own
  • 21:26 - 21:28
    picture of an animal or a plant but
  • 21:28 - 21:29
    we're just going to pick the the fork
  • 21:29 - 21:32
    icon because it looks a bit like a tree
  • 21:32 - 21:34
    uh and then I think there's one more
  • 21:34 - 21:35
    thing we need to change yeah well
  • 21:35 - 21:37
    spotted bled because at the moment the
  • 21:37 - 21:39
    code is going to show the animal species
  • 21:39 - 21:41
    number when we press button B and that
  • 21:41 - 21:43
    would be wrong so we need to click on
  • 21:43 - 21:46
    the little arrow on that and change that
  • 21:46 - 21:48
    to plant
  • 21:48 - 21:50
    species
  • 21:50 - 21:52
    perfect thank you Giles I think that's
  • 21:52 - 21:54
    looking like it should work really well
  • 21:54 - 21:55
    and we should be able to test out button
  • 21:55 - 22:01
    B on the simulator now as well um so if
  • 22:01 - 22:04
    I was outside and these were all the
  • 22:04 - 22:06
    plants I saw while I was in my
  • 22:06 - 22:09
    playground how many plant species would
  • 22:09 - 22:12
    I log how many times do I press button B
  • 22:12 - 22:14
    oh that's a good question because I can
  • 22:14 - 22:15
    see lots of flowers there so I might
  • 22:15 - 22:18
    want to keep clicking uh and click lots
  • 22:18 - 22:20
    of flowers but I need to think I need to
  • 22:20 - 22:22
    be really careful about this I think
  • 22:22 - 22:24
    there are only two species here because
  • 22:24 - 22:27
    I've got flowers like daisies they look
  • 22:27 - 22:29
    the same so although there's lots of FL
  • 22:29 - 22:31
    flowers there that's only one species
  • 22:31 - 22:33
    that I've spotted and then there's some
  • 22:33 - 22:35
    Ivy some leaves growing in the middle so
  • 22:35 - 22:38
    I think here if I saw that when I went
  • 22:38 - 22:41
    outside I would log two plant species I
  • 22:41 - 22:44
    would press button B twice fantastic
  • 22:44 - 22:47
    that is very accurate and correct so I'm
  • 22:47 - 22:52
    going to do button B twice now on my
  • 22:52 - 22:54
    simulator and there we go we can see the
  • 22:54 - 22:56
    plant icon came up and the number came
  • 22:56 - 22:58
    up each time as well which is exactly
  • 22:58 - 23:01
    what we've asked it to do using the code
  • 23:01 - 23:03
    so that's that's fantastic Planet that's
  • 23:03 - 23:06
    really good but the number just flashes
  • 23:06 - 23:10
    up what if I can't remember the number
  • 23:10 - 23:13
    of animal species and plant species is
  • 23:13 - 23:16
    there a way we can get to see the the
  • 23:16 - 23:18
    sort of running total without having to
  • 23:18 - 23:21
    add a new one each time yeah that's a
  • 23:21 - 23:22
    really good point because I can't
  • 23:22 - 23:24
    remember now even how many animal
  • 23:24 - 23:25
    species we'd already logged a few
  • 23:25 - 23:28
    minutes ago so we definitely need to to
  • 23:28 - 23:30
    to add that in because we don't want to
  • 23:30 - 23:34
    get our numbers muddled up so um let's
  • 23:34 - 23:36
    use the icons again to make it clear
  • 23:36 - 23:38
    which total is coming up on the LED
  • 23:38 - 23:42
    display but let's also um use a new
  • 23:42 - 23:44
    input so we've used button a and we've
  • 23:44 - 23:47
    used button B to do our actual logging
  • 23:47 - 23:50
    but now let's use the touch logo on the
  • 23:50 - 23:52
    front of the microbit as the input to
  • 23:52 - 23:54
    show us our totals so you'll find that
  • 23:54 - 23:57
    in the inputs menu and if you scroll
  • 23:57 - 23:59
    right down past where it says microbit
  • 23:59 - 24:03
    V2 right down here we get the on Logo
  • 24:03 - 24:06
    pressed block so if I pull that out now
  • 24:06 - 24:11
    I'm going to use this as my input now I
  • 24:11 - 24:13
    said we wanted to use the icons again so
  • 24:13 - 24:14
    that's the next time we're going next
  • 24:14 - 24:15
    thing we're going to do we're going to
  • 24:15 - 24:18
    go to basic we're going to drag out our
  • 24:18 - 24:21
    show icon pop it in here and I'm going
  • 24:21 - 24:24
    to change this one to the animal icon
  • 24:24 - 24:25
    we' selected
  • 24:25 - 24:28
    earlier and then I want to show my total
  • 24:28 - 24:31
    to Al number of animal species counted
  • 24:31 - 24:34
    so if I go back into basic take show
  • 24:34 - 24:38
    number pop it in and then I find my
  • 24:38 - 24:40
    variable my animal species variable in
  • 24:40 - 24:43
    the variables menu pull that out and
  • 24:43 - 24:47
    that goes on top so that means when you
  • 24:47 - 24:50
    press the logo the duck icon will will
  • 24:50 - 24:52
    come up and then the total number of
  • 24:52 - 24:54
    animal species now I also want to to see
  • 24:54 - 24:56
    the plant species but I don't want it
  • 24:56 - 24:59
    all to happen too quickly it needs to be
  • 24:59 - 25:00
    clear when we read it off the screen and
  • 25:00 - 25:02
    then when there's numbers that are
  • 25:02 - 25:05
    two-digit or even three-digit numbers
  • 25:05 - 25:07
    they will scroll so we need a little bit
  • 25:07 - 25:09
    of time for the microbit to do its thing
  • 25:09 - 25:12
    so we're going to leave a small pause so
  • 25:12 - 25:15
    if I go back into basic and scroll down
  • 25:15 - 25:18
    find the pause block I'm going to pop
  • 25:18 - 25:22
    that in and let's pause for two
  • 25:22 - 25:24
    seconds that shows up as 2,000
  • 25:24 - 25:27
    milliseconds on the Block and then I'm
  • 25:27 - 25:29
    going to go back into basic and another
  • 25:29 - 25:31
    time and I'm going to get the clear
  • 25:31 - 25:33
    screen block here so that clean the
  • 25:33 - 25:36
    screen goes completely clear before it
  • 25:36 - 25:37
    me any of the
  • 25:37 - 25:42
    plant species data so now I want to show
  • 25:42 - 25:44
    the plant species data actually I'll
  • 25:44 - 25:46
    just do one more pause before that so
  • 25:46 - 25:48
    I'm going to duplicate that block be
  • 25:48 - 25:50
    doubly sure that the screen clears and
  • 25:50 - 25:54
    has time to clear now back into basic
  • 25:54 - 25:58
    take your show icon change that to our
  • 25:58 - 26:03
    tree like icon here go back into basic
  • 26:03 - 26:06
    take another show number and this time
  • 26:06 - 26:09
    in the variables menu I choose plant
  • 26:09 - 26:14
    species and put it in there so hopefully
  • 26:14 - 26:16
    that will have given the microbit the
  • 26:16 - 26:19
    instructions needed for us to see the
  • 26:19 - 26:23
    totals on the screen when we want to to
  • 26:23 - 26:25
    recap how many we've counted of each so
  • 26:25 - 26:27
    shall we try out on the simulator now
  • 26:27 - 26:29
    Giles I think that sounds like a really
  • 26:29 - 26:30
    good idea right I'm going to put you to
  • 26:30 - 26:33
    the test I'm going to show you some
  • 26:33 - 26:35
    pictures and see if you can count along
  • 26:35 - 26:37
    and correctly count the species I'm
  • 26:37 - 26:40
    going to reset my microb bit first just
  • 26:40 - 26:42
    clear any of the data we've done so far
  • 26:42 - 26:43
    so you would do that on the real
  • 26:43 - 26:44
    microbit with the reset button on the
  • 26:44 - 26:46
    back but I've just pressed this uh
  • 26:46 - 26:49
    symbol here on the simulator okay test
  • 26:49 - 26:52
    me fantastic are you ready yes okay here
  • 26:52 - 26:55
    we go that's a tree so that's a plant
  • 26:55 - 26:57
    species so that's one plant species so
  • 26:57 - 27:00
    far oh that's another tree so hang on I
  • 27:00 - 27:02
    need to have pressed B once but not
  • 27:02 - 27:05
    again because they're the same species
  • 27:05 - 27:08
    well done okay let's try one more right
  • 27:08 - 27:10
    that's a different plant species so I'm
  • 27:10 - 27:12
    going to press B again that's the second
  • 27:12 - 27:15
    plant species I've
  • 27:15 - 27:18
    seen there's our lovely Robin that's a
  • 27:18 - 27:21
    animal species a bird
  • 27:21 - 27:25
    okay and I'll give you one more okay
  • 27:25 - 27:27
    fantastic that's
  • 27:27 - 27:31
    another animal species so let's see if I
  • 27:31 - 27:35
    go to my touch logo and I click this now
  • 27:35 - 27:36
    let's see what
  • 27:36 - 27:38
    happens animals
  • 27:38 - 27:41
    to should clear the screen there a
  • 27:41 - 27:45
    little pause there two fantastic
  • 27:45 - 27:49
    fantastic well done woohoo so that's it
  • 27:49 - 27:52
    if you have got this far with us you
  • 27:52 - 27:55
    have now coded your biodiversity code
  • 27:55 - 27:57
    along uh biodiversity counter I should
  • 27:57 - 28:01
    say that you can use outside in your
  • 28:01 - 28:07
    [Applause]
  • 28:07 - 28:10
    playground two lots of Applause and
  • 28:10 - 28:12
    cheering that's marvelous so once you
  • 28:12 - 28:15
    know the number of the current number of
  • 28:15 - 28:17
    animal and plant species you could
  • 28:17 - 28:20
    monitor whether this changes over time
  • 28:20 - 28:21
    because you could count them again in
  • 28:21 - 28:24
    the future um you might want to try some
  • 28:24 - 28:26
    things in your local environment to
  • 28:26 - 28:28
    improve biodiversity and see if you get
  • 28:28 - 28:29
    better better numbers next time if you
  • 28:29 - 28:32
    get a more diverse environment with
  • 28:32 - 28:34
    different more different kinds of
  • 28:34 - 28:36
    plants and there's lots of other things
  • 28:36 - 28:38
    you can do with that data that you go
  • 28:38 - 28:41
    outside and collect you could present it
  • 28:41 - 28:43
    in bar charts or other kinds of graphs
  • 28:43 - 28:45
    tally charts you could share your
  • 28:45 - 28:47
    findings with other classes in your
  • 28:47 - 28:50
    school or you could compare your
  • 28:50 - 28:52
    playground to other outdoor environments
  • 28:52 - 28:56
    such as Parks or maybe even another
  • 28:56 - 28:59
    school fabulous so thank you for those
  • 28:59 - 29:02
    ideas Giles they're really useful we we
  • 29:02 - 29:04
    have finished coding but there is one
  • 29:04 - 29:06
    more really important thing to do you
  • 29:06 - 29:10
    need to transfer the code to your real
  • 29:10 - 29:12
    life microbit so you can use it to count
  • 29:12 - 29:14
    biodiversity in your playground outside
  • 29:14 - 29:17
    or another outside area so what we're
  • 29:17 - 29:19
    going to do is we're going to um use the
  • 29:19 - 29:24
    USB cable to plug our mic bits into the
  • 29:24 - 29:26
    computer or laptop that you've been
  • 29:26 - 29:28
    using now if you've been using tablets
  • 29:28 - 29:29
    then obviously there's a different way
  • 29:29 - 29:32
    to transfer the code um I won't demo
  • 29:32 - 29:35
    that today but the link that is now
  • 29:35 - 29:37
    showing on screen will give you all the
  • 29:37 - 29:39
    different options for how to get code
  • 29:39 - 29:41
    onto your microbit tablets included so
  • 29:41 - 29:43
    you can have a look at that instead but
  • 29:43 - 29:46
    I'll just do a very quick demo of how to
  • 29:46 - 29:48
    get it on if you're using a laptop or a
  • 29:48 - 29:52
    tablet or a um sorry a desktop computer
  • 29:52 - 29:56
    so the small part of the USB cable goes
  • 29:56 - 29:58
    into the top of the microbit so you can
  • 29:58 - 30:01
    see there and then I'm going to plug
  • 30:01 - 30:02
    this
  • 30:02 - 30:06
    into my um my laptop that I'm using so
  • 30:06 - 30:09
    I'm plugging it in here the USB end of
  • 30:09 - 30:12
    it goes in okay now I'm just going to
  • 30:12 - 30:16
    share my screen before I
  • 30:16 - 30:20
    plug the rest of it in so one second
  • 30:20 - 30:24
    stop there I'm going to go
  • 30:24 - 30:25
    to
  • 30:25 - 30:29
    this okay now if I do this this way and
  • 30:29 - 30:31
    I get up my
  • 30:31 - 30:34
    downloads you will see something appear
  • 30:34 - 30:36
    in this menu on the left when I plug in
  • 30:36 - 30:37
    my
  • 30:37 - 30:40
    microbit so I've plugged it
  • 30:40 - 30:44
    in keep an eye here Tada the microbit
  • 30:44 - 30:46
    drive has appeared there because my mic
  • 30:46 - 30:48
    bit has been plugged in so I know that
  • 30:48 - 30:51
    it's connected and so now that I've
  • 30:51 - 30:55
    plugged it in on my make code editor I
  • 30:55 - 30:56
    need to click on the download button and
  • 30:56 - 30:59
    follow the instructions on screen
  • 30:59 - 31:02
    so I click that now download and it's
  • 31:02 - 31:04
    downloading to my micro bit now if it's
  • 31:04 - 31:05
    the first time you've downloaded it may
  • 31:05 - 31:07
    ask you to pair it first but you simply
  • 31:07 - 31:09
    follow the instructions on screen and it
  • 31:09 - 31:11
    will then give you the option to
  • 31:11 - 31:14
    download it if that doesn't work for any
  • 31:14 - 31:16
    reason there's also a drag and drop
  • 31:16 - 31:19
    method where if you download the hex
  • 31:19 - 31:22
    file using the three dots next to the
  • 31:22 - 31:24
    download button you can click on
  • 31:24 - 31:25
    download as
  • 31:25 - 31:30
    file okay that has now gone to my
  • 31:30 - 31:32
    downloads you can see it here there's
  • 31:32 - 31:34
    our project that we just made and I can
  • 31:34 - 31:36
    now drag and drop that on top of my
  • 31:36 - 31:40
    microbit drive and my microbit will
  • 31:40 - 31:41
    start flashing on the back so I know
  • 31:41 - 31:43
    that that's working as well so that's
  • 31:43 - 31:46
    another way to get it on okay so once
  • 31:46 - 31:48
    you've got it on there of course the
  • 31:48 - 31:50
    next thing to do is to plug your battery
  • 31:50 - 31:54
    pack in unplug it from your uh computer
  • 31:54 - 31:57
    and then you can take it outside and get
  • 31:57 - 32:00
    going with love the diversity all around
  • 32:00 - 32:03
    you in your
  • 32:03 - 32:05
    environment that's absolutely fantastic
  • 32:05 - 32:09
    so huge thanks to all of you for joining
  • 32:09 - 32:11
    our codal along today remember do get in
  • 32:11 - 32:14
    touch with us by tagging us you can do
  • 32:14 - 32:19
    that on Twitter or X using microbit edu
  • 32:19 - 32:21
    be great if you could show how you got
  • 32:21 - 32:24
    on making your biodiversity counter
  • 32:24 - 32:26
    today and how you use
  • 32:26 - 32:28
    them yes thank you to everyone who's
  • 32:28 - 32:30
    joined in we hope you've had fun coding
  • 32:30 - 32:33
    your biodiversity counter and uh good
  • 32:33 - 32:36
    luck investigating biodiversity in your
  • 32:36 - 32:37
    local
  • 32:37 - 32:43
    environment bye bye for now
  • 32:52 - 32:58
    [Music]
  • 32:58 - 33:01
    n
  • 33:05 - 33:35
    [Music]
Title:
Global pre-recorded event: biodiversity counter code-along
Description:

more » « less
Video Language:
English
Team:
Microbit_Educational_Foundation
Duration:
33:33

English (auto-generated) subtitles

Incomplete

Revisions

  • Revision 1 ASR: YouTube automatic subtitles
    Amara Bot