1 00:00:00,520 --> 00:00:07,760 micro:bit CreateAI is a free, web-based tool  that makes it easy for students to explore AI   2 00:00:07,760 --> 00:00:14,560 through movement and machine learning, and take  it into the real world with the BBC micro:bit.  3 00:00:14,560 --> 00:00:18,760 Add AI to your micro:bit learning  experience, by training a machine   4 00:00:18,760 --> 00:00:24,920 learning model with your own movement data  and use it in your micro:bit projects.  5 00:00:24,920 --> 00:00:29,240 You’ll need a computer with the Google  Chrome or Microsoft Edge web browsers   6 00:00:29,240 --> 00:00:37,240 to access micro:bit CreateAI. Click on ‘Get started’ to begin.  7 00:00:37,240 --> 00:00:44,040 First you need to collect some training data. You do this in the ‘data samples’ page.  8 00:00:44,040 --> 00:00:50,440 Click ‘Connect’ to connect a micro:bit  to CreateAI on your computer.  9 00:00:50,440 --> 00:00:53,200 This is the micro:bit you will  move, either holding it in your   10 00:00:53,200 --> 00:00:59,680 hand or attaching it to something that moves. We call this the data collection micro:bit.  11 00:00:59,680 --> 00:01:04,360 If your computer has Bluetooth  enabled, you just need 1 micro:bit.  12 00:01:04,360 --> 00:01:09,840 If it doesn’t have Bluetooth, you can use  a second micro:bit to act as a radio link.  13 00:01:09,840 --> 00:01:15,974 micro:bit CreateAI will show you the best way  to connect the data collection micro:bit to your computer. 14 00:01:15,974 --> 00:01:19,204 Just follow the instructions on screen. 15 00:01:19,204 --> 00:01:24,269 As you move the data collection micro:bit, you’ll see live movement data from its 16 00:01:24,269 --> 00:01:28,829 accelerometer sensor in a graph at the bottom of your computer screen. 17 00:01:28,829 --> 00:01:37,720 Choose at least two different movements you want CreateAI to learn to recognise. We call these movements ‘actions’.  18 00:01:37,720 --> 00:01:41,480 Waving and clapping are  good actions to start with.  19 00:01:41,480 --> 00:01:45,785 Name your first action. 20 00:01:45,785 --> 00:01:53,960 Click the ‘Record’ button to collect your first sample of data. Each sample lasts 1 second.  21 00:01:53,960 --> 00:01:59,560 You can record one sample at  a time or multiple samples.  22 00:01:59,560 --> 00:02:07,640 Collect at least three  samples of your first action.  23 00:02:07,640 --> 00:02:20,746 And do the same for at least one other action. 24 00:02:23,788 --> 00:02:34,780 Can you see similarities between the graphs of the waving data? And differences between waving and clapping?  25 00:02:34,780 --> 00:02:40,239 Next, click on ‘train model’. 26 00:02:40,239 --> 00:02:49,240 micro:bit CreateAI analyses your samples of data and creates a set of rules so  it can estimate what actions you’re making.  27 00:02:49,240 --> 00:02:56,320 These mathematical rules make up  the machine learning, or ML, model.  28 00:02:56,320 --> 00:03:00,320 Now you can test the ML model  in the ‘Testing model’ page.  29 00:03:00,320 --> 00:03:08,320 This shows which action the model  estimates that you’re making.  30 00:03:08,320 --> 00:03:12,000 The higher the percentage number,  the more confident the model is   31 00:03:12,000 --> 00:03:14,834 that you’re making a particular action. 32 00:03:14,834 --> 00:03:21,106 Wearing or holding the data collection micro:bit, do each of your actions in turn. 33 00:03:21,106 --> 00:03:30,160 If the model is not accurately estimating which actions you are doing, you may need to review your data and retrain the model.  34 00:03:30,160 --> 00:03:55,126 Click on ‘Edit data samples’ to collect more data samples, or delete any samples that you think may not fit. 35 00:03:55,126 --> 00:04:12,680 You can also add more actions, for example to teach the model what data for ‘being still’ looks like.  36 00:04:12,680 --> 00:04:20,086 Then you can retrain and test your ML model again. 37 00:04:20,086 --> 00:04:26,213 Once you’re happy that you’ve made an ML model that is good at recognising your chosen actions,  38 00:04:26,213 --> 00:04:33,143 you can use your model in a MakeCode program  and put it on a micro:bit. 39 00:04:33,143 --> 00:04:40,046 You’ll already have seen some blocks in the Testing model page. These are the machine learning, or ML, blocks 40 00:04:40,046 --> 00:04:45,080 you can use in your MakeCode programs. These blocks make different icons appear   41 00:04:45,080 --> 00:04:50,760 on the micro:bit display when each  action is recognised by the ML model.  42 00:04:50,760 --> 00:04:56,800 Click on ‘Edit in MakeCode’ to open the  blocks in a special MakeCode editor.  43 00:04:56,800 --> 00:05:08,880 Click on ‘Download’ to transfer your  code and your ML model to a micro:bit.  44 00:05:08,880 --> 00:05:18,668 Follow the instructions on screen. 45 00:05:18,668 --> 00:05:25,680 Unplug the micro:bit from your computer, attach a battery pack and test it out. You can take the micro:bit anywhere.  46 00:05:25,680 --> 00:05:32,425 Your ML model is now running on the micro:bit itself, you no longer need a computer to make it work. 47 00:05:32,425 --> 00:05:39,160 There are more ML blocks you can use to create your own projects using  AI with MakeCode, and you can combine   48 00:05:39,160 --> 00:05:42,320 these with all of the other blocks too. 49 00:05:42,320 --> 00:05:51,200 You can also save your project - your data and code blocks - together in one file  so you can continue working on it later.  50 00:05:51,200 --> 00:05:59,640 You can do this in CreateAI by clicking  ‘Save’ and giving your project a name.  51 00:06:03,160 --> 00:06:06,160 Or you can save your project from MakeCode.  52 00:06:06,160 --> 00:06:14,440 Just click on the 3 dots and  choose ‘download as file’.  53 00:06:14,440 --> 00:06:23,600 What will you create with machine learning  and MakeCode using micro:bit CreateAI?