WEBVTT 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   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.  00:00:14.560 --> 00:00:18.760 Add AI to your micro:bit learning  experience, by training a machine   00:00:18.760 --> 00:00:24.920 learning model with your own movement data  and use it in your micro:bit projects.  00:00:24.920 --> 00:00:29.240 You’ll need a computer with the Google  Chrome or Microsoft Edge web browsers   00:00:29.240 --> 00:00:37.240 to access micro:bit CreateAI. Click on ‘Get started’ to begin.  00:00:37.240 --> 00:00:44.040 First you need to collect some training data. You do this in the ‘data samples’ page.  00:00:44.040 --> 00:00:50.440 Click ‘Connect’ to connect a micro:bit  to CreateAI on your computer.  00:00:50.440 --> 00:00:53.200 This is the micro:bit you will  move, either holding it in your   00:00:53.200 --> 00:00:59.680 hand or attaching it to something that moves. We call this the data collection micro:bit.  00:00:59.680 --> 00:01:04.360 If your computer has Bluetooth  enabled, you just need 1 micro:bit.  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.  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. 00:01:15.974 --> 00:01:19.204 Just follow the instructions on screen. 00:01:19.204 --> 00:01:24.269 As you move the data collection micro:bit, you’ll see live movement data from its 00:01:24.269 --> 00:01:28.829 accelerometer sensor in a graph at the bottom of your computer screen. 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’.  00:01:37.720 --> 00:01:41.480 Waving and clapping are  good actions to start with.  00:01:41.480 --> 00:01:45.785 Name your first action. 00:01:45.785 --> 00:01:53.960 Click the ‘Record’ button to collect your first sample of data. Each sample lasts 1 second.  00:01:53.960 --> 00:01:59.560 You can record one sample at  a time or multiple samples.  00:01:59.560 --> 00:02:07.640 Collect at least three  samples of your first action.  00:02:07.640 --> 00:02:20.746 And do the same for at least one other action. 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?  00:02:34.780 --> 00:02:40.239 Next, click on ‘train model’. 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.  00:02:49.240 --> 00:02:56.320 These mathematical rules make up  the machine learning, or ML, model.  00:02:56.320 --> 00:03:00.320 Now you can test the ML model  in the ‘Testing model’ page.  00:03:00.320 --> 00:03:08.320 This shows which action the model  estimates that you’re making.  00:03:08.320 --> 00:03:12.000 The higher the percentage number,  the more confident the model is   00:03:12.000 --> 00:03:14.834 that you’re making a particular action. 00:03:14.834 --> 00:03:21.106 Wearing or holding the data collection micro:bit, do each of your actions in turn. 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.  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. 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.  00:04:12.680 --> 00:04:20.086 Then you can retrain and test your ML model again. 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,  00:04:26.213 --> 00:04:33.143 you can use your model in a MakeCode program  and put it on a micro:bit. 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 00:04:40.046 --> 00:04:45.080 you can use in your MakeCode programs. These blocks make different icons appear   00:04:45.080 --> 00:04:50.760 on the micro:bit display when each  action is recognised by the ML model.  00:04:50.760 --> 00:04:56.800 Click on ‘Edit in MakeCode’ to open the  blocks in a special MakeCode editor.  00:04:56.800 --> 00:05:08.880 Click on ‘Download’ to transfer your  code and your ML model to a micro:bit.  00:05:08.880 --> 00:05:18.668 Follow the instructions on screen. 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.  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. 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   00:05:39.160 --> 00:05:42.320 these with all of the other blocks too. 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.  00:05:51.200 --> 00:05:59.640 You can do this in CreateAI by clicking  ‘Save’ and giving your project a name.  00:06:03.160 --> 00:06:06.160 Or you can save your project from MakeCode.  00:06:06.160 --> 00:06:14.440 Just click on the 3 dots and  choose ‘download as file’.  00:06:14.440 --> 00:06:23.600 What will you create with machine learning  and MakeCode using micro:bit CreateAI?