BBC Microbit.

Slides:



Advertisements
Similar presentations
Introduction to TouchDevelop
Advertisements

BBC Microbit Getting set up and making your first program.
Notes and Questions on Chapters 13,14,15. The Sample Space, denoted S, of an experiment is a listing of all possible outcomes.  The sample space of rolling.
PIG GAME. MATERIALS  Dices  Scoring pad or sheets Player 1Player 2 Roll
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
ADVANCED EV3 PROGRAMMING LESSON By Seshan Brothers Random Block.
Lesson 4 Accelerometer.
Bbc microbit Lesson 3 – Temperature hot medium.
Lesson 1 – Getting to know your Microbit
micro:bit for primary schools – mb4ps.co.uk
Starter Activity Instructions: Complete the starter sheet Planner
micro:bit for primary schools – mb4ps.co.uk
@TeacherToolkit, license CC BY-NC-ND 3.0
@TeacherToolkit, license CC BY-NC-ND 3.0
Lesson 4 – Glowing pendulum
Objective of the lesson
Hacking Minecraft on the Raspberry Pi using Python
BBC Microbit.
BBC Microbit.
BBC Microbit.
micro:bit for primary schools – mb4ps.co.uk
BBC Microbit.
Stopwatch Cards Stopwatch Cards
Dance Cards Dance Cards
BBC Microbit.
اختر أي شخصية واجعلها تطير!
INTERMEDIATE PROGRAMMING LESSON
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
BBC Microbit.
Objective of the lesson
BBC Microbit.
Dance Cards Dance Cards
BBC Microbit.
BBC Microbit.
Dance Cards Dance Cards
Dance Cards Dance Cards
INTERMEDIATE PROGRAMMING LESSON
Dance Cards Dance Cards
Dance Cards Dance Cards
BBC Microbit.
By Sanjay and Arvind Seshan
BBC Microbit.
BBC Microbit.
BBC Microbit.
Objective of the lesson
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
Objective of the lesson
Dance Cards Dance Cards
Stopwatch Cards Stopwatch Cards
Getting Started with Physical Computing
INTERMEDIATE PROGRAMMING LESSON
Dance Cards Dance Cards
Lesson 2.
BBC Microbit.
Stopwatch Cards Stopwatch Cards
Can you find all the ways to solve them?
Dance Cards Dance Cards
BBC Microbit.
Stopwatch Cards Stopwatch Cards
Dance Cards Dance Cards
Exploring Computer Science Lesson 4-10 – Part 2
Dance Cards Dance Cards
Stopwatch Cards Stopwatch Cards
Lesson 1 – using the LED lights
Dance Cards Dance Cards
Stopwatch Cards Stopwatch Cards
Dance Cards Dance Cards
Presentation transcript:

BBC Microbit

Objective of the lesson Use Block Editor to make a Dice All of you will: Display a number for 1 to 6 for a single die Most of you will: Display a number for 1 to 12 for two dice Some of you will: Roll the dice when you shake the Microbit

Electronic Dice Add a button A pressed loop Drag out a ‘pick random’ block and change to ‘0 to 5’ This will create a random number which will be either 0,1,2,3,4,or 5

As the number keeps changing it is said to ‘vary’ As the number keeps changing it is said to ‘vary’. It is called a variable. If we are not careful, once the number is created it will be forgotten. To stop this happening we need to give it a name. We need to add a variable block to give the random number a name From the variables block, drag in ‘set item to’

Rename item to be ‘Random’ Call it Random

Now the number that is created is known as Random Now we need to get it to show the number Add in the show number block This is set to show the number 2 but we want it to show our random number from 0 to 5 which we have called Random

Get it to show the number called Random by picking this variable from the variables block Run the program and press the button A to create a Random number bewteen 0 and 5 But a dice should show the numbers 1 to 6 not 0 to 5 We can correct this by adding 1 to the value of Random do that 0 becomes 1, 1 becomes 2 etc and 5 becomes 6 You can do this by using the Maths block

Challenge Get it to show numbers from 1 to 12 as if you were throwing two dice Get it to roll a number 1 to 6 when you press button A and then another number 1 to 6 when you press button B Get it to roll the dice when you shake the Microbit

Challenge 1. Get it to show numbers from 1 to 12 as if you were throwing two dice 2. Get it to roll a number 1 to 6 when you press button A and then another number 1 to 6 when you press button B 3. Get it to roll the dice when you shake the Microbit