Broadcasting 2

Lesson (25 mins):

Classroom Code / Project: Send Radio Message

Equipment:  (1 for each Trainee) 

Skills

Keywords

Let’s look at Documentation!!!

Let’s say you want to combine some of the ideas you’ve learned from past lessons together but you don’t know what you need. 

Makecode has a documentation resource that can help point you in the direction you need to experiment. 


You can look at this information two ways, on almost every block, you can right-click and select help to open up the entry in the same window or you can look through the Makecode documentation site or makecode.microbit.org/blocks 


While you’re here:

Take a look at the pages under the “Things to do” heading on the documentation site to see some of the tutorials offered here. In the future, this site and others like it can be a source of inspiration for other Micro:bit projects to do!

Example Idea

Say you want to create a wearable that changes brightness based on which direction you’re facing?


You need to use the compass, and LEDs, Set the Brightness of LEDs, and a way to get them to work together.


The hint here is that the compass can give us a number that is bigger than the number that brightness can take. The second hint is that a block under math can help us here.


Right-click on the blocks you think might work and look at the help passage to find the blocks you need.

https://makecode.microbit.org/_XR5VHahi1WFz 


This can be useful for a lot of inputs that can deal with very different numbers. Once you find the range of values for a sensor (which is usually in the documentation) you can then map that value to something like sound or light. 


There’s also another block in there with a comment explaining a different way of combining LEDs, the compass, and the map function.