0:00:06.520,0:00:09.590 [Music] 0:00:23.680,0:00:29.929 [Music] 0:00:38.280,0:00:40.879 hello and welcome to our BBC microbic 0:00:40.879,0:00:44.440 Global codal my name is Giles and my 0:00:44.440,0:00:46.239 name is blaed and we are part of the 0:00:46.239,0:00:48.399 Education team here at the microbit 0:00:48.399,0:00:51.440 Educational Foundation now does anyone 0:00:51.440,0:00:55.079 know the theme of today's Cod along here 0:00:55.079,0:00:57.920 are a few 0:00:58.120,0:01:01.719 Clues there a butterfly 0:01:01.719,0:01:06.400 F uh oh okay that looks like some 0:01:06.400,0:01:10.400 flowers well that's definitely a 0:01:11.320,0:01:15.159 tree oh my goodness a very large Robin a 0:01:15.159,0:01:17.200 very large 0:01:17.200,0:01:20.479 bird so well done anyone watching if you 0:01:20.479,0:01:23.079 have shouted out the theme is 0:01:23.079,0:01:25.600 biodiversity happy International Day for 0:01:25.600,0:01:29.280 biological diversity um or International 0:01:29.280,0:01:31.040 Day for bio biodiversity as it can be 0:01:31.040,0:01:34.720 shortened to the United Nations theme uh 0:01:34.720,0:01:37.439 this year is all about building back 0:01:37.439,0:01:40.240 biodiversity because we all depend on a 0:01:40.240,0:01:46.040 wide variety of plants and animals and 0:01:46.040,0:01:48.880 microorganisms to keep us all healthy 0:01:48.880,0:01:52.360 and thriving so in today's codal along 0:01:52.360,0:01:54.600 you are going to be doing your bit as 0:01:54.600,0:01:56.039 well because you are going to be 0:01:56.039,0:01:58.960 building back bio biodiversity too by 0:01:58.960,0:02:01.680 creating a bi biodiversity counter that 0:02:01.680,0:02:03.920 can be used in your school playground or 0:02:03.920,0:02:06.320 any other outdoor area you have near 0:02:06.320,0:02:09.520 your school and as today is UN day for 0:02:09.520,0:02:12.599 biodiversity the plan is to create uh 0:02:12.599,0:02:15.720 the project in the make code editor but 0:02:15.720,0:02:17.640 then to transfer the code onto the 0:02:17.640,0:02:20.239 microbit and use them outside to count 0:02:20.239,0:02:22.000 the number of species of animals and 0:02:22.000,0:02:24.640 species of plants that you can spot you 0:02:24.640,0:02:26.560 don't need a microbit to take part in 0:02:26.560,0:02:28.519 this session as we will be making good 0:02:28.519,0:02:30.480 use of the simulator on make code 0:02:30.480,0:02:33.040 website but if you do have microbits 0:02:33.040,0:02:34.599 then make sure you have them out ready 0:02:34.599,0:02:36.720 to put the code on at the end of the 0:02:36.720,0:02:39.120 session and in today's session we're 0:02:39.120,0:02:41.560 going to be coding along together make 0:02:41.560,0:02:44.159 sure that you pause the video whenever 0:02:44.159,0:02:46.480 you need to and you can replay parts 0:02:46.480,0:02:49.640 that you need to hear over again I'm 0:02:49.640,0:02:51.200 really excited that we're coding the 0:02:51.200,0:02:53.440 biodiversity cter together so students 0:02:53.440,0:02:55.200 all over the world can see what their 0:02:55.200,0:02:58.519 local biodiversity is like if you have a 0:02:58.519,0:03:01.080 school Twitter or X account then make 0:03:01.080,0:03:05.040 sure you share how you get on you can 0:03:05.040,0:03:10.239 tag us we are at microbit uncore edu 0:03:10.239,0:03:14.319 that's microbit uncore edu on Twitter or 0:03:14.319,0:03:17.519 X that's a really good idea J it will be 0:03:17.519,0:03:19.720 lovely to see how different classes and 0:03:19.720,0:03:22.599 schools get on in their environments so 0:03:22.599,0:03:25.280 I think we're ready to get started Giles 0:03:25.280,0:03:26.640 can you think of anything else we need 0:03:26.640,0:03:29.360 to mention before we start coding I 0:03:29.360,0:03:31.799 think as we're making a species counter 0:03:31.799,0:03:33.319 I think it would be really good just to 0:03:33.319,0:03:35.319 make sure that everyone knows exactly 0:03:35.319,0:03:39.200 what a species is great call Giles okay 0:03:39.200,0:03:42.159 so a species is a set of animals or 0:03:42.159,0:03:45.040 plants who have similar characteristics 0:03:45.040,0:03:46.959 to each other so they all look similar 0:03:46.959,0:03:48.319 to each other and they have similar 0:03:48.319,0:03:50.680 characteristics so for 0:03:50.680,0:03:53.400 example let's look at these pictures 0:03:53.400,0:03:56.280 here so let me just remove this so that 0:03:56.280,0:04:00.239 you can see it better there we go so so 0:04:00.239,0:04:02.920 um in the in the slide here we've got 0:04:02.920,0:04:05.599 lots of different animals but how many 0:04:05.599,0:04:08.319 species have we got Giles oh that's a 0:04:08.319,0:04:09.920 really interesting question it's quite 0:04:09.920,0:04:11.720 tricky actually um I'm going to start 0:04:11.720,0:04:13.879 with the ones that all look the same so 0:04:13.879,0:04:17.199 I can see some snails there um some in 0:04:17.199,0:04:19.639 their shells some out of their shells so 0:04:19.639,0:04:21.759 I think the three pictures of snails 0:04:21.759,0:04:23.479 that's one 0:04:23.479,0:04:27.199 species um I can see Robin again a bird 0:04:27.199,0:04:28.800 and I don't see any other birds on there 0:04:28.800,0:04:31.160 so I think that's probably another 0:04:31.160,0:04:35.840 species um we've got oh two butterflies 0:04:35.840,0:04:38.960 so I think two butterflies uh probably 0:04:38.960,0:04:43.199 one more species and then I can see a 0:04:43.199,0:04:47.000 fly and I can see a worms so I think 0:04:47.000,0:04:49.759 have we got five species there blonded 0:04:49.759,0:04:53.360 well done yes I think that is spot on 0:04:53.360,0:04:54.840 and that means that everyone is very 0:04:54.840,0:04:56.759 clear and everyone can be super accurate 0:04:56.759,0:04:58.320 when they go out and they start logging 0:04:58.320,0:05:01.560 their species later thanks chares so 0:05:01.560,0:05:05.720 let's get coding um so the what we're 0:05:05.720,0:05:07.160 going to do is we're going to bring you 0:05:07.160,0:05:09.720 to the makecode editor 0:05:09.720,0:05:13.000 website so um you'll find that you can 0:05:13.000,0:05:15.320 see it on the banner now at make code. 0:05:15.320,0:05:18.080 microbit 0:05:29.720,0:05:31.520 you can get started with right away 0:05:31.520,0:05:34.520 without needing any logins or passwords 0:05:34.520,0:05:36.280 and so on so there is a sign-in button 0:05:36.280,0:05:37.800 on the top right so schools with 0:05:37.800,0:05:39.960 Microsoft or Google logins can use that 0:05:39.960,0:05:41.680 but we don't need to we can jump 0:05:41.680,0:05:44.160 straight in um now I've got some 0:05:44.160,0:05:46.199 projects showing here because I've used 0:05:46.199,0:05:48.039 it before if it's your first time you 0:05:48.039,0:05:50.440 might not have that but you will have 0:05:50.440,0:05:52.479 new project the new project button and 0:05:52.479,0:05:53.800 that's what we're going to jump straight 0:05:53.800,0:05:56.759 into also in the settings on make code 0:05:56.759,0:05:58.560 in the top right there's a little Cog 0:05:58.560,0:06:00.720 here next to the sign-in button that's 0:06:00.720,0:06:02.560 where you'll find different languages if 0:06:02.560,0:06:04.680 you want to change the language to to 0:06:04.680,0:06:09.400 your local language so click on new 0:06:09.400,0:06:11.680 project and the first thing it does is 0:06:11.680,0:06:14.120 asks me to give it a name so if you're 0:06:14.120,0:06:16.680 doing the same project as the CL it's a 0:06:16.680,0:06:19.120 really good idea to make sure that your 0:06:19.120,0:06:21.400 name or your student name is is is 0:06:21.400,0:06:24.360 included in the project name and today 0:06:24.360,0:06:28.000 we're making a biodiversity counter so 0:06:28.000,0:06:29.840 I'm going to name my project blana 0:06:29.840,0:06:33.800 biodiversity counter and click on 0:06:33.800,0:06:36.520 create okay so this has opened up the 0:06:36.520,0:06:39.800 make code editor so we can see that 0:06:39.800,0:06:41.759 there's some blocks of code already in 0:06:41.759,0:06:43.400 the workspace here on the right now I'm 0:06:43.400,0:06:45.120 going to make that a little bit bigger 0:06:45.120,0:06:47.120 by using this plus sign in the bottom 0:06:47.120,0:06:49.240 right hand side going to zoom in on my 0:06:49.240,0:06:51.800 blocks of code a little bit do you think 0:06:51.800,0:06:53.720 that's large enough Giles I think so I 0:06:53.720,0:06:55.000 can see that really clearly thank you 0:06:55.000,0:06:58.080 blet okay brilliant so um this is the 0:06:58.080,0:06:59.599 workspace this is where you can draw 0:06:59.599,0:07:01.639 drag blocks of codee around and you drag 0:07:01.639,0:07:03.680 them in from the toolbox over here and 0:07:03.680,0:07:06.199 you build your code in this space now we 0:07:06.199,0:07:08.160 won't need the forever block for our 0:07:08.160,0:07:09.560 project today so I'm actually going to 0:07:09.560,0:07:11.160 show you how to delete the blocks as 0:07:11.160,0:07:14.919 well by dragging them onto the uh the 0:07:14.919,0:07:17.080 the menu here or the toolbox and then 0:07:17.080,0:07:19.080 just letting go and it will delete a 0:07:19.080,0:07:22.400 block um when you have a look inside 0:07:22.400,0:07:24.120 this menu you can see that there's lots 0:07:24.120,0:07:27.080 of pre-prepared blocks of code ready to 0:07:27.080,0:07:29.720 go you don't need to have to know what 0:07:29.720,0:07:32.160 to type like you would in a text based 0:07:32.160,0:07:34.800 um editor you can just take the blocks 0:07:34.800,0:07:36.639 and you can drag and drop them onto the 0:07:36.639,0:07:38.520 workspace as you need 0:07:38.520,0:07:41.360 them um on the left hand side here we've 0:07:41.360,0:07:44.319 also got the simulator so we'll be using 0:07:44.319,0:07:46.240 this today to check that everything is 0:07:46.240,0:07:48.840 working before we put our code on our 0:07:48.840,0:07:51.919 microbit and take them outside to do our 0:07:51.919,0:07:55.720 biodiversity logging um we'll also be 0:07:55.720,0:07:58.360 using the download button we just take 0:07:58.360,0:08:00.039 off the banner for a second perfect 0:08:00.039,0:08:02.360 thank you Giles so the download button 0:08:02.360,0:08:04.120 here bottom left that will be used at 0:08:04.120,0:08:07.159 the end of the session so that we uh can 0:08:07.159,0:08:10.840 put our code onto our microbit so we 0:08:10.840,0:08:12.919 will if I just show you on my screen let 0:08:12.919,0:08:17.479 me get a view of me on the screen 0:08:17.560,0:08:20.840 second so on the microbit here we will 0:08:20.840,0:08:23.159 use the USB lead we will plug that into 0:08:23.159,0:08:25.000 our computer and we'll plug the other 0:08:25.000,0:08:26.960 end into our microbit and we will press 0:08:26.960,0:08:28.560 download and we will put the code on the 0:08:28.560,0:08:30.720 microbit and then attach the battery 0:08:30.720,0:08:32.560 pack so that we can bring it outside 0:08:32.560,0:08:36.320 into the environment and uh code and use 0:08:36.320,0:08:40.279 the code we have created that way okay 0:08:40.279,0:08:42.800 so coming back to our project that we're 0:08:42.800,0:08:45.839 going to create today um I'm going to 0:08:45.839,0:08:48.399 stop here and have a little think about 0:08:48.399,0:08:51.480 what my program is going to do I want to 0:08:51.480,0:08:54.560 use my microbit in the playground ler to 0:08:54.560,0:08:57.279 count two different things the number of 0:08:57.279,0:08:59.200 animal species and the number of plant 0:08:59.200,0:09:01.560 species species I want the microbit to 0:09:01.560,0:09:03.880 count for me and remember how many of 0:09:03.880,0:09:05.200 these species I spotted because there's 0:09:05.200,0:09:06.800 absolutely no way I'm going to keep all 0:09:06.800,0:09:09.680 that information in my head so I want 0:09:09.680,0:09:11.640 the microbit to remember the information 0:09:11.640,0:09:14.079 or the data so that means I need to 0:09:14.079,0:09:17.800 create two different variables so in the 0:09:17.800,0:09:21.160 toolbox here we've got variables as a 0:09:21.160,0:09:24.320 red menu section of the menu so if I 0:09:24.320,0:09:26.680 click on variables you'll see it gives 0:09:26.680,0:09:28.720 me one option right now and that is to 0:09:28.720,0:09:31.240 make a variable able so variables are 0:09:31.240,0:09:33.000 like containers they will hold different 0:09:33.000,0:09:34.680 pieces of information and they will keep 0:09:34.680,0:09:37.160 updating as we use the microbit and add 0:09:37.160,0:09:38.120 more 0:09:38.120,0:09:41.240 information so the two uh variables I 0:09:41.240,0:09:44.120 want to create today are I click on make 0:09:44.120,0:09:45.640 a variable and then I name them so I'm 0:09:45.640,0:09:48.200 going to call my first one animal 0:09:48.200,0:09:51.399 species and click okay and then I'm 0:09:51.399,0:09:53.519 going to oh you see straight away some 0:09:53.519,0:09:56.079 Co some blocks of code have appeared 0:09:56.079,0:09:57.519 because I've created this variable so 0:09:57.519,0:09:58.880 we've got some other blocks of code here 0:09:58.880,0:10:02.160 we can use later and then I click on 0:10:02.160,0:10:03.920 make a variable again and I'm going to 0:10:03.920,0:10:05.880 call this plant 0:10:05.880,0:10:09.880 species and click on okay so now I've 0:10:09.880,0:10:14.000 got options to use these blocks of code 0:10:14.000,0:10:17.640 to change it from animal to plant when I 0:10:17.640,0:10:20.320 need it and I've made my two variables 0:10:20.320,0:10:21.959 if I go back into variables here I can 0:10:21.959,0:10:23.800 see them sitting here animal species and 0:10:23.800,0:10:24.880 plant 0:10:24.880,0:10:28.000 species okay so let me just delete that 0:10:28.000,0:10:31.040 properly there we go 0:10:31.040,0:10:34.240 so everyone approaches coding a little 0:10:34.240,0:10:35.959 bit differently and sometimes there are 0:10:35.959,0:10:37.440 different ways to achieve the same 0:10:37.440,0:10:39.920 things so Giles what would you do next 0:10:39.920,0:10:41.880 now that we've created the variables 0:10:41.880,0:10:43.320 well I was just thinking about that when 0:10:43.320,0:10:45.800 I turn on my mic a bit and the program 0:10:45.800,0:10:49.320 starts I won't have counted any Vari I 0:10:49.320,0:10:51.200 won't have counted any animal species or 0:10:51.200,0:10:53.920 plant species yet so I'm thinking 0:10:53.920,0:10:56.760 whether it's a good idea to set both 0:10:56.760,0:11:00.240 variables to zero so what I might do is 0:11:00.240,0:11:03.320 I might go into the variables 0:11:03.320,0:11:07.560 menu and take set plant species to zero 0:11:07.560,0:11:11.079 and drag that into the on block anything 0:11:11.079,0:11:13.760 you put in the onstart block will um the 0:11:13.760,0:11:15.880 microbit will carry out that instruction 0:11:15.880,0:11:17.639 when the program starts running so it's 0:11:17.639,0:11:20.320 going to set the zero uh set the plant 0:11:20.320,0:11:22.480 species to zero at the start of the 0:11:22.480,0:11:25.959 program then I drag the same block again 0:11:25.959,0:11:29.040 so I go back into variables and drag out 0:11:29.040,0:11:31.360 set plant species to zero again but I'm 0:11:31.360,0:11:35.040 going to change maybe plant species to 0:11:35.040,0:11:36.120 animal 0:11:36.120,0:11:39.480 species so we have plant species and 0:11:39.480,0:11:41.720 animal species both set to zero at the 0:11:41.720,0:11:43.320 start of the program do you think that's 0:11:43.320,0:11:46.600 a good idea blet yes definitely I would 0:11:46.600,0:11:48.160 I would have done the same thing at this 0:11:48.160,0:11:50.000 point for sure to make sure that the 0:11:50.000,0:11:51.920 microbit knows to start counting from 0:11:51.920,0:11:54.519 zero for each of those variables there's 0:11:54.519,0:11:56.760 one other thing I do as well um there's 0:11:56.760,0:11:58.720 nothing on the screen of the microbit 0:11:58.720,0:12:00.680 when you turn on at the moment and I 0:12:00.680,0:12:02.639 think it would be useful to also show a 0:12:02.639,0:12:04.959 zero on the screen so I'm going to add 0:12:04.959,0:12:07.519 in that instruction I'm going to go into 0:12:07.519,0:12:10.600 the basic menu so the menus are all 0:12:10.600,0:12:13.279 colorcoded and blue blocks are from the 0:12:13.279,0:12:15.399 basic menu I'm going to take the first 0:12:15.399,0:12:17.720 one here show number and I'm going to 0:12:17.720,0:12:20.800 drag that in to the onart block here 0:12:20.800,0:12:23.000 it's already got the number zero in it 0:12:23.000,0:12:25.120 and now you can see the simulator has 0:12:25.120,0:12:27.720 updated and when my mic bit starts it 0:12:27.720,0:12:31.600 will show a zero on the screen as well 0:12:31.600,0:12:34.040 okay so let's have a quick recap to to 0:12:34.040,0:12:35.680 make sure that everyone is keeping up 0:12:35.680,0:12:37.560 when they're coding along in their 0:12:37.560,0:12:40.000 classrooms so have you made your 0:12:40.000,0:12:41.920 variables remember we went into 0:12:41.920,0:12:44.320 variables we clicked make a variable and 0:12:44.320,0:12:46.720 we made two one called animal species 0:12:46.720,0:12:50.120 and one called plant species okay have 0:12:50.120,0:12:52.800 you set your variables to zero we took 0:12:52.800,0:12:55.600 out this one set plant species to zero 0:12:55.600,0:12:56.959 and we used it 0:12:56.959,0:12:59.480 twice but we changed it using the drop 0:12:59.480,0:13:01.399 down menu from plant species to animal 0:13:01.399,0:13:04.920 species and we popped that into the 0:13:04.920,0:13:07.880 onstart block and then we added a zero 0:13:07.880,0:13:09.959 through using the show Number Block here 0:13:09.959,0:13:14.720 in the basic menu as well okay 0:13:14.720,0:13:16.639 so that 0:13:16.639,0:13:20.519 means we have got started but there's 0:13:20.519,0:13:23.440 two very important things that we need 0:13:23.440,0:13:25.920 to do next and they're both to do with 0:13:25.920,0:13:28.079 using the buttons on the microbit 0:13:28.079,0:13:29.480 because we're going to be using both 0:13:29.480,0:13:33.079 button a and button B uh that are on the 0:13:33.079,0:13:35.600 front of the microbit so we're going to 0:13:35.600,0:13:37.880 use one button to log data about animal 0:13:37.880,0:13:39.760 species and we're going to use another 0:13:39.760,0:13:41.680 button to log the data about plant 0:13:41.680,0:13:45.959 species so let's start with button a 0:13:45.959,0:13:48.079 here are a few 0:13:48.079,0:13:52.160 clues for what we're going to 0:13:52.160,0:13:54.880 use button a for any 0:13:54.880,0:13:59.880 ideas well um let me see we had uh a 0:13:59.880,0:14:03.040 butterfly we've had uh a bird and a 0:14:03.040,0:14:07.040 snail so I think a is going to be for 0:14:07.040,0:14:10.560 Animals correct yes A is for Animals is 0:14:10.560,0:14:13.360 animals that's easy to remember yes so 0:14:13.360,0:14:15.480 all the pictures are animals so button a 0:14:15.480,0:14:18.240 is going to lck the animal species so to 0:14:18.240,0:14:19.800 make something happen on the micob bit 0:14:19.800,0:14:22.240 when we press button a we will need the 0:14:22.240,0:14:24.680 on button a press block so you'll find 0:14:24.680,0:14:26.959 this in a new menu the the purple 0:14:26.959,0:14:29.839 purpley pink menu here called 0:14:29.839,0:14:32.600 if I go into that menu the very first 0:14:32.600,0:14:35.040 block is on button a press so let's pull 0:14:35.040,0:14:37.360 that out and put that into the 0:14:37.360,0:14:41.040 workspace okay so we want the animal 0:14:41.040,0:14:44.320 species uh variable to update by one 0:14:44.320,0:14:47.480 each time we press button a so that 0:14:47.480,0:14:49.000 means I need to go back into my 0:14:49.000,0:14:52.759 variables menu in here and I I'm looking 0:14:52.759,0:14:55.160 at the second block here I want to 0:14:55.160,0:14:57.639 change something by one when I press 0:14:57.639,0:15:00.920 button a now when I pull this out just 0:15:00.920,0:15:02.920 pop it there for a moment it it goes 0:15:02.920,0:15:04.240 this strange color because it's not 0:15:04.240,0:15:07.079 inside uh a working block at the moment 0:15:07.079,0:15:09.000 but I can still manipulate it here I can 0:15:09.000,0:15:10.720 still change it to what I want so I 0:15:10.720,0:15:12.600 actually want to change the animal 0:15:12.600,0:15:14.839 species on but a so I'm going to switch 0:15:14.839,0:15:17.759 that to animal species and I pop it 0:15:17.759,0:15:22.240 inside the on button a pressed block so 0:15:22.240,0:15:25.040 that means that the microbit will update 0:15:25.040,0:15:27.079 the total number of animal 0:15:27.079,0:15:31.720 species each time we press button a uh 0:15:31.720,0:15:34.720 on the micro bit 0:15:34.759,0:15:37.959 itself okay Planet I I got a question 0:15:37.959,0:15:40.000 here I I've been following along I've 0:15:40.000,0:15:41.880 got the same blocks as you but when I 0:15:41.880,0:15:45.560 press button a I just get zero on the 0:15:45.560,0:15:47.839 screen even though I keep pressing 0:15:47.839,0:15:50.639 button a have I done something wrong not 0:15:50.639,0:15:53.680 at all Giles um 0:15:53.680,0:15:56.560 I I have the same thing happening on my 0:15:56.560,0:16:00.440 mic bit on here so I might be pressing 0:16:00.440,0:16:02.519 on my simulator I might press butt a a 0:16:02.519,0:16:04.240 couple of times but my screen has not 0:16:04.240,0:16:06.639 changed so you have not done anything 0:16:06.639,0:16:09.839 wrong you just have not given the 0:16:09.839,0:16:12.120 microbit the instructions to do that 0:16:12.120,0:16:15.560 part yet okay the micr will only do what 0:16:15.560,0:16:18.160 you ask it to do if we want to see the 0:16:18.160,0:16:20.839 total on the LED display then we need to 0:16:20.839,0:16:22.360 put those instructions in and ask the 0:16:22.360,0:16:24.120 microbit to show it to us so let's add a 0:16:24.120,0:16:26.000 few more blocks to make that 0:16:26.000,0:16:30.880 happen so if we go into to um what are 0:16:30.880,0:16:32.440 we going to go we're going to go into 0:16:32.440,0:16:35.519 into basic first of all and we're going 0:16:35.519,0:16:39.399 to scroll down to the show icon block 0:16:39.399,0:16:42.319 okay so this will help us know that when 0:16:42.319,0:16:44.600 it shows us data on the LED display it's 0:16:44.600,0:16:48.839 talking about animal species data so I'm 0:16:48.839,0:16:51.440 going to pop that in here and I'm going 0:16:51.440,0:16:53.639 to change the icon from a heart to 0:16:53.639,0:16:55.480 something that resembles an animal 0:16:55.480,0:16:57.920 species so let's have a look got lots of 0:16:57.920,0:17:00.240 pre-prepared icons here right I'm going 0:17:00.240,0:17:02.680 to choose the duck so we've got a little 0:17:02.680,0:17:06.559 duck icon to to stand for our animal 0:17:06.559,0:17:09.640 species right um the next thing I'm 0:17:09.640,0:17:11.360 going to do is I'm going to go back into 0:17:11.360,0:17:13.280 basic and I'm going to take the show 0:17:13.280,0:17:15.439 number block again and I'm going to pop 0:17:15.439,0:17:18.400 it in below now this time I don't want 0:17:18.400,0:17:21.160 to the show Number Block to show us zero 0:17:21.160,0:17:23.199 I want it to show the total number of 0:17:23.199,0:17:25.880 animal species on the LED display so 0:17:25.880,0:17:29.039 I've got to go back into variables and 0:17:29.039,0:17:31.520 find my animal species block the small 0:17:31.520,0:17:34.440 one here so I take this out and you can 0:17:34.440,0:17:37.720 see how it can slot in over the zero and 0:17:37.720,0:17:41.280 replace it so we do that and then our 0:17:41.280,0:17:43.039 code will 0:17:43.039,0:17:46.520 update okay so now if we test if it's 0:17:46.520,0:17:48.679 working on the simulator it should work 0:17:48.679,0:17:51.000 this time but actually I've got an idea 0:17:51.000,0:17:53.880 to test that Giles so do you remember 0:17:53.880,0:17:57.000 this this slide that we looked at 0:17:57.000,0:18:01.320 earlier oh yeah was it again how many 0:18:01.320,0:18:03.559 times I press a if these were the 0:18:03.559,0:18:06.080 animals I'd seen outside oh gosh right 0:18:06.080,0:18:07.960 I'm trying to remember again we had 0:18:07.960,0:18:11.320 snails and uh that was one species and 0:18:11.320,0:18:12.919 then we had two butterflies but that's 0:18:12.919,0:18:14.520 only one more species because they're 0:18:14.520,0:18:17.000 both both the same species so that's one 0:18:17.000,0:18:21.240 more uh we had a bird and we've got a 0:18:21.240,0:18:23.440 fly and I've got a worm so I think it 0:18:23.440,0:18:26.159 was five different animal species that 0:18:26.159,0:18:29.840 we have there correct well done J yes so 0:18:29.840,0:18:33.159 on my simulator now I am going to press 0:18:33.159,0:18:35.400 a five times and let's see if we can see 0:18:35.400,0:18:38.039 something happening and 0:18:38.039,0:18:44.120 see yes there we go one two 3 0:18:44.120,0:18:47.039 4 five so we've now given the correct 0:18:47.039,0:18:49.080 instructions yeah so we can see now that 0:18:49.080,0:18:50.919 when we log one it will give us some 0:18:50.919,0:18:52.960 feedback on the LED display to know that 0:18:52.960,0:18:56.919 it's happened um so if everyone has got 0:18:56.919,0:19:00.799 this part coded then that means we are 0:19:00.799,0:19:04.360 halfway there 0:19:05.480,0:19:07.280 yay 0:19:07.280,0:19:10.360 fantastic fantastic so we're halfway 0:19:10.360,0:19:12.799 there um and we've told the microb bit 0:19:12.799,0:19:14.400 what to do when we press button a when 0:19:14.400,0:19:17.480 we're counting animal species but we 0:19:17.480,0:19:20.600 haven't yet told it what to do when we 0:19:20.600,0:19:24.320 press button B now I wonder if anyone 0:19:24.320,0:19:27.600 can remember what are we going to count 0:19:27.600,0:19:30.000 when we press but button B can anyone 0:19:30.000,0:19:31.760 remember that 0:19:31.760,0:19:36.360 I ah right so we've got uh some flowers 0:19:36.360,0:19:37.840 we've got a 0:19:37.840,0:19:43.640 tree um oh and some more plants oh is it 0:19:43.640,0:19:45.159 plant species 0:19:45.159,0:19:48.000 Jiles might be plant species that we're 0:19:48.000,0:19:49.640 getting when we press button 0:19:49.640,0:19:52.240 D so what we want to do is we want to 0:19:52.240,0:19:55.640 use button B to to log plant species so 0:19:55.640,0:19:59.840 what we can do now is we can dup at or 0:19:59.840,0:20:02.960 copy the blocks that we have for button 0:20:02.960,0:20:04.880 a I wonder bled could you show us how to 0:20:04.880,0:20:05.960 do 0:20:05.960,0:20:07.960 that what do you can you just tell us 0:20:07.960,0:20:09.640 what you're doing there to get that that 0:20:09.640,0:20:12.240 menu to pop up yeah so I've put my 0:20:12.240,0:20:15.360 cursor over the entire block on button a 0:20:15.360,0:20:17.520 pressed and then I've right clicked and 0:20:17.520,0:20:19.520 then I get the menu at duplicate at the 0:20:19.520,0:20:21.240 top so you can duplicate that's one way 0:20:21.240,0:20:22.919 of doing it or you can just fetch the 0:20:22.919,0:20:25.360 blocks again uh from the toolbox in the 0:20:25.360,0:20:27.000 middle but just because it's quicker and 0:20:27.000,0:20:28.840 easier we're going to show you uh how to 0:20:28.840,0:20:30.600 duplicate so if you click on that and 0:20:30.600,0:20:32.720 duplicate the block you'll see again 0:20:32.720,0:20:34.440 like a bit like it did before the blocks 0:20:34.440,0:20:36.559 have gone a funny color uh and that's 0:20:36.559,0:20:39.520 because we've got two on button a press 0:20:39.520,0:20:41.919 blocks and we can only have one uh set 0:20:41.919,0:20:43.960 of instructions for what to do when you 0:20:43.960,0:20:45.679 press button a otherwise the microbit 0:20:45.679,0:20:48.159 will get really confused so first thing 0:20:48.159,0:20:51.360 we need to do is to change button a to 0:20:51.360,0:20:55.919 button B okay and then because we're not 0:20:55.919,0:20:57.720 counting animal species anymore we need 0:20:57.720,0:21:01.159 to change animal species to plant 0:21:01.159,0:21:03.080 species and I think it would be a good 0:21:03.080,0:21:05.280 idea to show a different picture at this 0:21:05.280,0:21:07.480 point not a duck so we'll pick something 0:21:07.480,0:21:09.760 else so if you click on that have a look 0:21:09.760,0:21:11.760 and pick something there is I think 0:21:11.760,0:21:13.960 there's a fork icon that looks a little 0:21:13.960,0:21:17.279 bit like a tree that's it that one we 0:21:17.279,0:21:19.919 can pick that you can also draw your own 0:21:19.919,0:21:21.640 plant icon as well if you like you can 0:21:21.640,0:21:24.360 use the show LEDs Block in the basic 0:21:24.360,0:21:25.840 category and you can draw your own 0:21:25.840,0:21:27.880 picture of an animal or a plant but 0:21:27.880,0:21:29.480 we're just going to pick the the fork 0:21:29.480,0:21:32.039 icon because it looks a bit like a tree 0:21:32.039,0:21:33.799 uh and then I think there's one more 0:21:33.799,0:21:35.440 thing we need to change yeah well 0:21:35.440,0:21:37.240 spotted bled because at the moment the 0:21:37.240,0:21:39.159 code is going to show the animal species 0:21:39.159,0:21:40.720 number when we press button B and that 0:21:40.720,0:21:42.600 would be wrong so we need to click on 0:21:42.600,0:21:45.640 the little arrow on that and change that 0:21:45.640,0:21:48.120 to plant 0:21:48.120,0:21:49.640 species 0:21:49.640,0:21:52.039 perfect thank you Giles I think that's 0:21:52.039,0:21:53.520 looking like it should work really well 0:21:53.520,0:21:55.320 and we should be able to test out button 0:21:55.320,0:22:00.679 B on the simulator now as well um so if 0:22:00.679,0:22:04.159 I was outside and these were all the 0:22:04.159,0:22:06.159 plants I saw while I was in my 0:22:06.159,0:22:09.240 playground how many plant species would 0:22:09.240,0:22:12.120 I log how many times do I press button B 0:22:12.120,0:22:13.600 oh that's a good question because I can 0:22:13.600,0:22:15.400 see lots of flowers there so I might 0:22:15.400,0:22:18.200 want to keep clicking uh and click lots 0:22:18.200,0:22:19.799 of flowers but I need to think I need to 0:22:19.799,0:22:22.240 be really careful about this I think 0:22:22.240,0:22:24.480 there are only two species here because 0:22:24.480,0:22:26.960 I've got flowers like daisies they look 0:22:26.960,0:22:28.520 the same so although there's lots of FL 0:22:28.520,0:22:31.159 flowers there that's only one species 0:22:31.159,0:22:33.120 that I've spotted and then there's some 0:22:33.120,0:22:35.240 Ivy some leaves growing in the middle so 0:22:35.240,0:22:37.720 I think here if I saw that when I went 0:22:37.720,0:22:40.720 outside I would log two plant species I 0:22:40.720,0:22:44.279 would press button B twice fantastic 0:22:44.279,0:22:46.559 that is very accurate and correct so I'm 0:22:46.559,0:22:51.679 going to do button B twice now on my 0:22:51.679,0:22:54.000 simulator and there we go we can see the 0:22:54.000,0:22:56.240 plant icon came up and the number came 0:22:56.240,0:22:57.919 up each time as well which is exactly 0:22:57.919,0:23:00.919 what we've asked it to do using the code 0:23:00.919,0:23:03.360 so that's that's fantastic Planet that's 0:23:03.360,0:23:05.600 really good but the number just flashes 0:23:05.600,0:23:10.440 up what if I can't remember the number 0:23:10.440,0:23:13.240 of animal species and plant species is 0:23:13.240,0:23:15.559 there a way we can get to see the the 0:23:15.559,0:23:18.039 sort of running total without having to 0:23:18.039,0:23:20.720 add a new one each time yeah that's a 0:23:20.720,0:23:21.960 really good point because I can't 0:23:21.960,0:23:23.559 remember now even how many animal 0:23:23.559,0:23:25.120 species we'd already logged a few 0:23:25.120,0:23:28.159 minutes ago so we definitely need to to 0:23:28.159,0:23:30.039 to add that in because we don't want to 0:23:30.039,0:23:33.799 get our numbers muddled up so um let's 0:23:33.799,0:23:35.919 use the icons again to make it clear 0:23:35.919,0:23:37.919 which total is coming up on the LED 0:23:37.919,0:23:42.039 display but let's also um use a new 0:23:42.039,0:23:43.720 input so we've used button a and we've 0:23:43.720,0:23:46.600 used button B to do our actual logging 0:23:46.600,0:23:49.640 but now let's use the touch logo on the 0:23:49.640,0:23:51.679 front of the microbit as the input to 0:23:51.679,0:23:54.080 show us our totals so you'll find that 0:23:54.080,0:23:56.880 in the inputs menu and if you scroll 0:23:56.880,0:23:59.440 right down past where it says microbit 0:23:59.440,0:24:03.120 V2 right down here we get the on Logo 0:24:03.120,0:24:05.919 pressed block so if I pull that out now 0:24:05.919,0:24:10.600 I'm going to use this as my input now I 0:24:10.600,0:24:12.799 said we wanted to use the icons again so 0:24:12.799,0:24:14.279 that's the next time we're going next 0:24:14.279,0:24:15.279 thing we're going to do we're going to 0:24:15.279,0:24:17.840 go to basic we're going to drag out our 0:24:17.840,0:24:20.799 show icon pop it in here and I'm going 0:24:20.799,0:24:23.640 to change this one to the animal icon 0:24:23.640,0:24:24.919 we' selected 0:24:24.919,0:24:28.360 earlier and then I want to show my total 0:24:28.360,0:24:31.159 to Al number of animal species counted 0:24:31.159,0:24:34.240 so if I go back into basic take show 0:24:34.240,0:24:38.080 number pop it in and then I find my 0:24:38.080,0:24:40.240 variable my animal species variable in 0:24:40.240,0:24:43.320 the variables menu pull that out and 0:24:43.320,0:24:46.880 that goes on top so that means when you 0:24:46.880,0:24:49.600 press the logo the duck icon will will 0:24:49.600,0:24:51.760 come up and then the total number of 0:24:51.760,0:24:54.480 animal species now I also want to to see 0:24:54.480,0:24:55.919 the plant species but I don't want it 0:24:55.919,0:24:58.520 all to happen too quickly it needs to be 0:24:58.520,0:25:00.279 clear when we read it off the screen and 0:25:00.279,0:25:02.360 then when there's numbers that are 0:25:02.360,0:25:04.799 two-digit or even three-digit numbers 0:25:04.799,0:25:06.720 they will scroll so we need a little bit 0:25:06.720,0:25:09.159 of time for the microbit to do its thing 0:25:09.159,0:25:11.760 so we're going to leave a small pause so 0:25:11.760,0:25:15.480 if I go back into basic and scroll down 0:25:15.480,0:25:18.120 find the pause block I'm going to pop 0:25:18.120,0:25:21.520 that in and let's pause for two 0:25:21.520,0:25:24.080 seconds that shows up as 2,000 0:25:24.080,0:25:27.000 milliseconds on the Block and then I'm 0:25:27.000,0:25:28.799 going to go back into basic and another 0:25:28.799,0:25:30.720 time and I'm going to get the clear 0:25:30.720,0:25:33.200 screen block here so that clean the 0:25:33.200,0:25:35.840 screen goes completely clear before it 0:25:35.840,0:25:37.240 me any of the 0:25:37.240,0:25:41.720 plant species data so now I want to show 0:25:41.720,0:25:43.799 the plant species data actually I'll 0:25:43.799,0:25:45.760 just do one more pause before that so 0:25:45.760,0:25:47.679 I'm going to duplicate that block be 0:25:47.679,0:25:50.000 doubly sure that the screen clears and 0:25:50.000,0:25:54.120 has time to clear now back into basic 0:25:54.120,0:25:57.880 take your show icon change that to our 0:25:57.880,0:26:02.640 tree like icon here go back into basic 0:26:02.640,0:26:06.080 take another show number and this time 0:26:06.080,0:26:08.559 in the variables menu I choose plant 0:26:08.559,0:26:14.159 species and put it in there so hopefully 0:26:14.159,0:26:16.080 that will have given the microbit the 0:26:16.080,0:26:18.679 instructions needed for us to see the 0:26:18.679,0:26:22.559 totals on the screen when we want to to 0:26:22.559,0:26:24.919 recap how many we've counted of each so 0:26:24.919,0:26:26.679 shall we try out on the simulator now 0:26:26.679,0:26:28.559 Giles I think that sounds like a really 0:26:28.559,0:26:30.000 good idea right I'm going to put you to 0:26:30.000,0:26:32.559 the test I'm going to show you some 0:26:32.559,0:26:34.840 pictures and see if you can count along 0:26:34.840,0:26:36.880 and correctly count the species I'm 0:26:36.880,0:26:40.000 going to reset my microb bit first just 0:26:40.000,0:26:41.760 clear any of the data we've done so far 0:26:41.760,0:26:42.799 so you would do that on the real 0:26:42.799,0:26:44.120 microbit with the reset button on the 0:26:44.120,0:26:45.880 back but I've just pressed this uh 0:26:45.880,0:26:49.080 symbol here on the simulator okay test 0:26:49.080,0:26:51.720 me fantastic are you ready yes okay here 0:26:51.720,0:26:54.840 we go that's a tree so that's a plant 0:26:54.840,0:26:57.159 species so that's one plant species so 0:26:57.159,0:26:59.559 far oh that's another tree so hang on I 0:26:59.559,0:27:02.159 need to have pressed B once but not 0:27:02.159,0:27:04.520 again because they're the same species 0:27:04.520,0:27:08.080 well done okay let's try one more right 0:27:08.080,0:27:09.840 that's a different plant species so I'm 0:27:09.840,0:27:12.080 going to press B again that's the second 0:27:12.080,0:27:14.880 plant species I've 0:27:15.000,0:27:17.679 seen there's our lovely Robin that's a 0:27:17.679,0:27:21.159 animal species a bird 0:27:21.159,0:27:25.320 okay and I'll give you one more okay 0:27:25.320,0:27:26.799 fantastic that's 0:27:26.799,0:27:31.080 another animal species so let's see if I 0:27:31.080,0:27:34.840 go to my touch logo and I click this now 0:27:34.840,0:27:36.000 let's see what 0:27:36.000,0:27:38.039 happens animals 0:27:38.039,0:27:41.159 to should clear the screen there a 0:27:41.159,0:27:44.720 little pause there two fantastic 0:27:44.720,0:27:49.200 fantastic well done woohoo so that's it 0:27:49.200,0:27:51.640 if you have got this far with us you 0:27:51.640,0:27:54.679 have now coded your biodiversity code 0:27:54.679,0:27:57.240 along uh biodiversity counter I should 0:27:57.240,0:28:01.060 say that you can use outside in your 0:28:01.060,0:28:07.200 [Applause] 0:28:07.200,0:28:09.519 playground two lots of Applause and 0:28:09.519,0:28:11.519 cheering that's marvelous so once you 0:28:11.519,0:28:15.159 know the number of the current number of 0:28:15.159,0:28:17.440 animal and plant species you could 0:28:17.440,0:28:19.720 monitor whether this changes over time 0:28:19.720,0:28:21.039 because you could count them again in 0:28:21.039,0:28:23.679 the future um you might want to try some 0:28:23.679,0:28:25.640 things in your local environment to 0:28:25.640,0:28:27.880 improve biodiversity and see if you get 0:28:27.880,0:28:29.480 better better numbers next time if you 0:28:29.480,0:28:31.840 get a more diverse environment with 0:28:31.840,0:28:34.200 different more different kinds of 0:28:34.200,0:28:36.320 plants and there's lots of other things 0:28:36.320,0:28:37.840 you can do with that data that you go 0:28:37.840,0:28:40.519 outside and collect you could present it 0:28:40.519,0:28:43.120 in bar charts or other kinds of graphs 0:28:43.120,0:28:45.399 tally charts you could share your 0:28:45.399,0:28:47.159 findings with other classes in your 0:28:47.159,0:28:49.559 school or you could compare your 0:28:49.559,0:28:51.600 playground to other outdoor environments 0:28:51.600,0:28:55.919 such as Parks or maybe even another 0:28:55.919,0:28:58.919 school fabulous so thank you for those 0:28:58.919,0:29:01.640 ideas Giles they're really useful we we 0:29:01.640,0:29:03.640 have finished coding but there is one 0:29:03.640,0:29:06.320 more really important thing to do you 0:29:06.320,0:29:09.880 need to transfer the code to your real 0:29:09.880,0:29:11.880 life microbit so you can use it to count 0:29:11.880,0:29:14.360 biodiversity in your playground outside 0:29:14.360,0:29:16.559 or another outside area so what we're 0:29:16.559,0:29:19.320 going to do is we're going to um use the 0:29:19.320,0:29:23.600 USB cable to plug our mic bits into the 0:29:23.600,0:29:25.559 computer or laptop that you've been 0:29:25.559,0:29:28.120 using now if you've been using tablets 0:29:28.120,0:29:29.360 then obviously there's a different way 0:29:29.360,0:29:32.159 to transfer the code um I won't demo 0:29:32.159,0:29:34.960 that today but the link that is now 0:29:34.960,0:29:36.880 showing on screen will give you all the 0:29:36.880,0:29:38.919 different options for how to get code 0:29:38.919,0:29:41.200 onto your microbit tablets included so 0:29:41.200,0:29:43.039 you can have a look at that instead but 0:29:43.039,0:29:45.799 I'll just do a very quick demo of how to 0:29:45.799,0:29:48.440 get it on if you're using a laptop or a 0:29:48.440,0:29:52.080 tablet or a um sorry a desktop computer 0:29:52.080,0:29:56.240 so the small part of the USB cable goes 0:29:56.240,0:29:58.480 into the top of the microbit so you can 0:29:58.480,0:30:00.519 see there and then I'm going to plug 0:30:00.519,0:30:01.640 this 0:30:01.640,0:30:05.640 into my um my laptop that I'm using so 0:30:05.640,0:30:08.519 I'm plugging it in here the USB end of 0:30:08.519,0:30:12.159 it goes in okay now I'm just going to 0:30:12.159,0:30:16.240 share my screen before I 0:30:16.240,0:30:19.519 plug the rest of it in so one second 0:30:19.519,0:30:23.760 stop there I'm going to go 0:30:23.760,0:30:25.279 to 0:30:25.279,0:30:29.240 this okay now if I do this this way and 0:30:29.240,0:30:31.399 I get up my 0:30:31.399,0:30:34.200 downloads you will see something appear 0:30:34.200,0:30:36.200 in this menu on the left when I plug in 0:30:36.200,0:30:37.080 my 0:30:37.080,0:30:39.559 microbit so I've plugged it 0:30:39.559,0:30:43.640 in keep an eye here Tada the microbit 0:30:43.640,0:30:45.840 drive has appeared there because my mic 0:30:45.840,0:30:47.960 bit has been plugged in so I know that 0:30:47.960,0:30:51.039 it's connected and so now that I've 0:30:51.039,0:30:54.559 plugged it in on my make code editor I 0:30:54.559,0:30:56.360 need to click on the download button and 0:30:56.360,0:30:58.600 follow the instructions on screen 0:30:58.600,0:31:01.960 so I click that now download and it's 0:31:01.960,0:31:03.519 downloading to my micro bit now if it's 0:31:03.519,0:31:05.279 the first time you've downloaded it may 0:31:05.279,0:31:07.440 ask you to pair it first but you simply 0:31:07.440,0:31:09.480 follow the instructions on screen and it 0:31:09.480,0:31:11.360 will then give you the option to 0:31:11.360,0:31:13.760 download it if that doesn't work for any 0:31:13.760,0:31:16.279 reason there's also a drag and drop 0:31:16.279,0:31:18.760 method where if you download the hex 0:31:18.760,0:31:21.720 file using the three dots next to the 0:31:21.720,0:31:23.760 download button you can click on 0:31:23.760,0:31:25.159 download as 0:31:25.159,0:31:29.679 file okay that has now gone to my 0:31:29.679,0:31:31.679 downloads you can see it here there's 0:31:31.679,0:31:34.120 our project that we just made and I can 0:31:34.120,0:31:36.480 now drag and drop that on top of my 0:31:36.480,0:31:39.559 microbit drive and my microbit will 0:31:39.559,0:31:41.200 start flashing on the back so I know 0:31:41.200,0:31:42.639 that that's working as well so that's 0:31:42.639,0:31:45.799 another way to get it on okay so once 0:31:45.799,0:31:47.919 you've got it on there of course the 0:31:47.919,0:31:49.840 next thing to do is to plug your battery 0:31:49.840,0:31:53.919 pack in unplug it from your uh computer 0:31:53.919,0:31:56.919 and then you can take it outside and get 0:31:56.919,0:31:59.760 going with love the diversity all around 0:31:59.760,0:32:02.559 you in your 0:32:02.600,0:32:05.440 environment that's absolutely fantastic 0:32:05.440,0:32:08.600 so huge thanks to all of you for joining 0:32:08.600,0:32:10.919 our codal along today remember do get in 0:32:10.919,0:32:14.200 touch with us by tagging us you can do 0:32:14.200,0:32:19.240 that on Twitter or X using microbit edu 0:32:19.240,0:32:21.279 be great if you could show how you got 0:32:21.279,0:32:23.559 on making your biodiversity counter 0:32:23.559,0:32:26.120 today and how you use 0:32:26.120,0:32:28.480 them yes thank you to everyone who's 0:32:28.480,0:32:30.360 joined in we hope you've had fun coding 0:32:30.360,0:32:33.279 your biodiversity counter and uh good 0:32:33.279,0:32:35.519 luck investigating biodiversity in your 0:32:35.519,0:32:36.960 local 0:32:36.960,0:32:42.799 environment bye bye for now 0:32:51.650,0:32:58.440 [Music] 0:32:58.440,0:33:01.440 n 0:33:04.930,0:33:34.950 [Music]