Code In The Classroom - Kids Code Jeunesse

Transcription

Code in the on to micro:bit

We are a bilingual, Canadian not for profit organization dedicatedto empowering children and educators, with a particular focuson girls and children from disadvantaged groups, with the skillswe all need to thrive in a technology driven society. Since 2013,we have reached more than 4300 teachers and over 150,000students.We’re igniting young minds across Canada by teaching kids tocode. Learning computational thinking, coding, and physicalcomputing provides youth with the skills needed to create,communicate, and innovate with the tools of the 21st century. Andby introducing code into classrooms and communities, we’re ableto create a new generation of thinkers, creators and doers.

Hour 1:ShapesLearning Objectives: Familiarity with physical computing through micro:bit.Familiarity with micro:bit block code sequences, modularization and repetition.Familiarity with computational practices like planning and experimentationMaterials: Graph paperOverhead projectorOnline Editor makecode.microbit.orgComputers with working USB ports (not iPads!)Micro:bitsAnimation cardsWARM UP Simple 5x5 grid unpluggedAsk for three volunteers.Volunteer (A) sits at desk with back to simple image drawn on 5 x 5 grid onwhiteboard, blackboard, or projected on a powerpoint slide. This could be a duck,or a heart, or whatever the educator decides.Volunteer (B) gives simple directions to volunteer (A) to recreate image.Volunteer (C) writes down the directions that volunteer (B) gives.Once challenge has been accomplished, volunteer (C) reads out the directions.Class reflects on how the directions could be simplified using sequences andrepetition.1

DUCKSET UP AND INTRO Micro:bit and platformClass completes an introductory animation on the Makecode emulator, likeanimating their name.Class completes their first download to see the animation on the micro:bit.2

Hour 1:ShapesACTIVITY 1 Make it move!Class creates simple animations using Makecode LED panels, e.g. heartbeat,smiley faces, jumping jacks, or animations on the KCJ animation cards.Tip: Students can save time by creating core shape on one LED, right click toduplicate, and add/change only LED dots that need to be different.3

To make it easier to experiment, class creates a clear button.ACTIVITY 2 Name your code!Class names sequences (modularize) using “functions” and loop withrepeat blocks.4

Hour 1:ShapesACTIVITY 3 Lightcraft!Class weaves sequences and threads them together using modularization andrepetition.E.g. [your name] [beating heart] [jumping jacks]Tip: use blank panels or pause blocks to “punctuate” sequencesREFLECTIONClass reflects on successes and challenges. What problems did they encounter. How were these problems solved. What was most fun? What was most frustrating?Stretch and extension challenges:Explore other projects on MakeCode, like Coin Flipper.5

notes6

Hour 2:DotsLearning Objectives: Assimilation of sequences and repetitionIntroduction to binary on/off, variables and random assignmentIntroduction to programming indexFamiliarity with computational practice like planning and experimentationWARM UPGraph paper unplugged. Instructor hides a “ship” of 3 or 4 squares that class mustguess. Using numbered 0-4 x, y coordinates along 5 x 5 grid.00123471234

As class guesses (naming horizontal, x, coordinate first) instructor marks eitherO (miss) or X (hit). Once squares are guessed, class reflects on advantages andchallenges of working with a numbered grid compared to unplugged exercise inhour 1.Quick revision (optional):Class revisits basics with “show number” and the “random” block to construct adice (as in “dice” tutorial on MakeCode)ACTIVITY 1 Blinking dotsClass experiments with plotting dots on the microbit using an x, y block.8

Hour 2:Dots continuedA fun demo for the power of these coordinates combined with random blocks:Starry LightsClass experiments with: Changing numbers from 0 to 4. Using the following blocks to create animation effects:9

ACTIVITY 2 Blinking linesClass creates a line of dots with the 0 to 4 loop and a variable block.First name some new variables to go with the “index” variable:Class uses a for loop to “step” the x coordinate through positions 0-4.Tip: Highlight the process by clicking the snail icon under the emulator.Class experiments with: Moving one variable block from x to y. Using unplot and pause blocks to change the animation effect.10

Hour 2:DotsACTIVITY 3 Full grid challenge!Class is challenged to fill the entire 5 x 5 grid one dot at a time.Some might do this by simply stacking for 0 to 4 loops on top of each other. Somemight fill it up with the random block.Some students might come up with the idea of “nesting” one loop inside anotherfor 0 to 4 loop and using the second variables. One of these students can beinvited to demonstrate. Instructor demonstrates only if no one has come with asolution independently.Experiment with: Switching variable blocks. Unplot and pause blocks.11

REFLECTIONPrompts: What problems were encountered and how did you solve them. What was more fun and/or more challenging, shapes or dots?Extension challenges: Use random blocks inside the “pause” blocks to create a “firefly” effect. Nest a second for 0 to 4 loop inside the outside loop for a “snake” effect.Modularize this code with functions.12

Activity Cards

Jumping JacksFlying Bat14

Pinwheel APinwheel B15

Sinking BoatFloating Duck16

DATE:for completing this introduction to micro:bit exercise!presented to:Certificate of Achievement

ResourcesMicrobit resources for teachers include lesson plans, curriculums,project ideas:https://microbit.org/teach/The KCJ art:bit facilitates animation and makes using the micro:bit easier foryounger students. It is currently available for chromebooks and soon to beavailable for iPads.https://kidscodejeunesse.org/artbit.htmlCode Club micro:bit projects are great for stretch obit/18

Notes19

20

We're igniting young minds across Canada by teaching kids to code. Learning computational thinking, coding, and physical computing provides youth with the skills needed to create, communicate, and innovate with the tools of the 21st century. And by introducing code into classrooms and communities, we're able