Lesson 4 – Glowing pendulum

Slides:



Advertisements
Similar presentations
Enter question text... 1.Enter answer text.... Enter question text... 1.Enter answer text...
Advertisements

A dding two negative integers: add the absolute values the answer is negative Adding a negative and a positive number: subtract the absolute values the.
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
BBC Microbit Getting set up and making your first program.
Dividing a Decimal by a Decimal. Dividing Whole Numbers 12 ÷ 2 = 120 ÷ 20 = 1200 ÷ 200 = ÷ 2000 = Multiply both 12 and 2 by 10 Multiply.
10/19 No Warm Up Make sure you have: something to write with calculator.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
BBC MICRO:BIT Lesson 2 Variables and Lists. Variables When programming it is often necessary to store a value for use later on in the program. A variable.
Bbc microbit Lesson 3 – Temperature hot medium.
Lesson 1 – Getting to know your Microbit
Spreadsheet Basics: Using Formulas to do calculations
Starter Activity Instructions: Complete the starter sheet Planner
@TeacherToolkit, license CC BY-NC-ND 3.0
Objective of the lesson
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
Stopwatch Cards Stopwatch Cards
Dance Cards Dance Cards
BBC Microbit.
Use proper case (ie Caps for the beginnings of words)
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Variables Lesson 3.
BBC Microbit.
Objective of the lesson
BBC Microbit.
Dance Cards Dance Cards
BBC Microbit.
BBC Microbit.
Game Controller Lesson Three.
Dance Cards Dance Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
BBC Microbit.
BBC Microbit.
BBC Microbit.
micro:bit for primary schools – mb4ps.co.uk
BBC Microbit.
Objective of the lesson
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
Dance Cards Dance Cards
Stopwatch Cards Stopwatch Cards
micro:bit for primary schools – mb4ps.co.uk
Dance Cards Dance Cards
BBC Microbit.
micro:bit for primary schools – mb4ps.co.uk
Stopwatch Cards Stopwatch Cards
Game Over Module 4 Lesson 2.
An Introduction to VEX IQ Programming with Modkit
Dance Cards Dance Cards
Put it all together Lesson 6.
BBC Microbit.
Variables Lesson 3.
Stopwatch Cards Stopwatch Cards
Dance Cards Dance Cards
Dance Cards Dance Cards
I can program behaviours using inputs and outputs
Stopwatch Cards Stopwatch Cards
Lesson 1 – using the LED lights
Lesson 5 – Coding a temperature gauge
Dance Cards Dance Cards
Stopwatch Cards Stopwatch Cards
Dance Cards Dance Cards
Presentation transcript:

Lesson 4 – Glowing pendulum Bbc microbit Lesson 4 – Glowing pendulum hot

Glowing pendulum Use a forever block so that your program will continue to run. Set up a variable called acceleration and store the acceleration (y) of the Microbit into this variable, this will allow your to use the data stored from the acceleration later in your program.

Glowing pendulum Now we need to make sure the acceleration comes out with a positive value so we need to take the absolute value of the acceleration we use the Math abs code to do this, then of course enter the variable acceleration.

Glowing pendulum Divide the acceleration value by 4 because we want a value between 0 and 256 and the variable currently has a number stored between 0 and 1024.

Glowing pendulum Firstly set the brightness of the LED’s depending on how fast the Microbit is moving then turn them on.

Glowing pendulum Upload the code to your Microbit and see what happens when you move your Microbit like a pendulum. If you have forgotten how to upload go back and look at lesson 1 and 2.

Glowing pendulum Answer these questions in assessment tool, you must answer these before you move onto the extension challenges.

Glowing pendulum Extension Challenge 1 Answer this in assessment tool.