Getting Started with Javascript Blocks: Answering Machine Worksheet

Total Page:16

File Type:pdf, Size:1020Kb

Getting Started with Javascript Blocks: Answering Machine Worksheet

Getting Started With JavaScript Blocks: Answering Machine Worksheet

Challenge 1 You are going to design, test and build a program that works like an answering machine. It displays a Hello message at all times.

Step 1 Head to the micro:bit website and go to the Let’s Code tab. JavaScript Blocks Editor.

Open the JavaScript Blocks Editor, you should see something like this.

Before we get started in programming, plug in your micro:bit using the USB and let it load as an external hard drive. Self-Assessment  I can load up the software on the micro:bit website.

 I can plug in the micro:bit to the computer. Step 2 Now you have your micro:bit you need to have a look at the device and work out all the different parts. Use the table below to label the devices, once you’ve worked it out.

Label the different parts of the micro:bit

1  micro:bit Educational Foundation 2016 Getting Started With JavaScript Blocks: Answering Machine Worksheet

Step 3

Back on your computer, using the JavaScript Blocks editor try and find the string command so you can get things displayed on your micro:bit.

Place the string block inside the forever loop and run the program.

Screen print of working program

Self-Assessment  I can write a simple program on the JavaScript Blocks Editor.

 I can download my program from the micro:bit website.

 I can drop and drag my program onto the micro:bit.

 I can test my micro:bit Step 4 Let’s think about what the program does so far, by answering the following questions.

In your own words describe what the forever block does.

Describe in your own words what a string is?

Self-Assessment  I know what a forever block does in my program

 I can identify the string in the program and understand what a string is.

2 Getting Started With JavaScript Blocks: Answering Machine Worksheet

Challenges Well done for completing the answering machine project. Now you can see it working can you try to modify your code so it does some or all of the challenges below. Don’t worry if you can’t, we’ll look at them all in another session.

 Could you add a yes and no Adding a Yes & No buttons.  Introducing a shake input.  Add a scoring system.

3  micro:bit Educational Foundation 2016

Recommended publications