DIY Binary Coding

Create your own binary code on DIY Swish Cards to program Phiro

Objective

By the end of this lesson, learners will be able to

  • Understand computers store information in binary numbers: 0s & 1s
  • Demonstrate knowledge that binary code patterns translate to robot function, without a computer
  • Encode decimal numbers to binary code
  • Create DIY binary code to program Phiro
  • Imagine possibilities of their own DIY Code-based creative coding of robots
Subjects

Robotics, Coding, Binary, Math

Age

All Ages

Duration

40 min

Robot & Accessories Needed

Phiro Unplugged or Phiro Pro robot Swish Cards

Tools

Black marker

  • step1
  • step2
  • step3
  • step4
  • step5
  • step6
STEP 1

Ask

  • How do computers think?
  • All the information inside computers or robots, even music or pictures is stored in computer language. What language do computers speak?
  • Because computers depend on ON/OFF switches, the language computers speak is 2 numbers: 0 & 1. Counting with 0 & 1 is called Binary.
  • Can you imagine that just 0s & 1s can be used to represent all kinds of information (light, movement, music etc) that a robot or computer can store?!
  • Patterns of binary code will tell the computer or robot what to do, move or play music or flash lights!
  • How do you think you can create binary code?
  • How do you imagine binary code in BLACK & WHITE bars on a Swish Card can instruct Phiro to do what you want?
STEP 2

Imagine

Explore how to use binary to encode information. Explore the back of Swish Cards and notice the patterns of black and white bars that match the card numbers.

STEP 3

Plan

Now that you know how to encode binary information as black and white bars, let's plan to create DIY binary code on Swish Cards to program Phiro to do what you want! Get your black marker ready to start shading.

  • Swish Cards have two rows of black and white bars
  • 1st row: REFERENCE Code, is same for all Swish Cards : 1010101010
  • 2nd row: ACTION Code, will vary according to action &number of the Swish Card. First and last boxes are black, while code in-between represent Swish Card action & number
  • Action Code represents 8 bit binary coding in all cards.
  • In above card, 2nd row represents binary code 00010110, which represents card # 22.
STEP 4

Create

Select a Swish Card to program Phiro to Move Forward one step, Flash Both LEDs Red, Wait for 1 sec and Play "Do" tone. Identify the Binary code for these four cards (#1, #23, #49, #13) and use the DIY coding cards to shade and program Phiro. Did the DIY coding work? Did Phiro follow your instruction that you shaded and swiped?

DIY Coding Card

STEP 5

Remix

Remix the same 4 cards used before and try out other challenges.

Hint: remix the Card #1 (00000001) to Card #3 (00000011) very easily by shading one more box or bit.

For an advanced remix challenge, shade a DIY binary code swish card and give it your friend to guess what the binary number is and what Phiro will do when programmed with it and see if they got it right!

STEP 6

Share

Share how you used Binary coding to program Phiro with us using #MyPhiro and @RobotixLS and we will share it with the world.