Week 3

Week 3: Variables & Logic+

This week we will look at how a computer "thinks" and makes decisions through looking at logic.  We'll use the basic if/then/else structure to create a simple decision algorithm that uses logic to fill in categories for variables.  Additionally, we will discuss how to connect servo motors to the micro:bit to add motion to your projects.  We'll spend some time discussing designing for humans and using empathy to guide our design decisions to create human-centered designs. 


Video for Week 3


Slides for Week 3


Example Code for Variables & Logic

Example Code for Servos


Example Code for a Temp Sensor


Submit Your Flipgrid For Week 3

This week we are using the ability of the micro:bit to make decisions based on logic.  Create a program in MakeCode incorporating one of the new skills we learned this week.  We have shown you how a micro:bit can sense its environment in a variety of ways. This week we moved further into how it can use those inputs to “make decisions” and respond based on the rules in your code.


Issue: We’re home and bored. Our pet is bored too. We want to teach our pet (or sibling) a new trick where it moves an object and gets a reward.



Problem: How do we build a simple set up that automatically dispenses a pet treat when it moves an object?



Submit Your Flipgrid

Return to Micro:Bit Home
Share by: