LESSON 2

Cards (46)

  • Computer
    A device that processes information and performs a variety of tasks
  • Main components of a computer
    • Processor
    • Memory
    • Input
    • Output
  • Processor
    Responsible for the main processing of information
  • Memory
    Stores information so that it can be accessed again at a later time
  • Random Access Memory (RAM)

    Short-term memory, any data stored inside the RAM will be cleared when the computer is rebooted
  • Storage
    Houses large amounts of data that is persistent when the computer reboots
  • Input
    Data processed from the real world to the computer
  • Output
    Data processed from the computer to the real world
  • Micro:bit
    A small pocket-sized computer with LED light display, buttons, sensors, and 10 features to make an interactive device
  • External parts of the Micro:bit
    • LED screen
    • User buttons
    • Microphone
    • Digital I/O
    • Power indicator
    • USB activity indicator
    • Reset button
  • LED screen
    A 5x5 grid that can show output
  • User buttons
    Two buttons (A and B) that can be programmed separately
  • Microphone
    Used for getting sound input
  • Digital I/O
    Can be used for input and output by creating an electrical connection
  • Power indicator
    Tells you if there is power on the Micro:bit
  • USB activity indicator

    Blinks whenever programs are being copied from the computer to the Micro:bit
  • Reset button
    Allows resetting the Micro:bit
  • on start
    Code added inside this block will run whenever the Micro:bit starts
  • forever
    Code added inside this block will run forever in the background
  • pause
    Pauses for a certain amount of milliseconds before continuing to the next block
  • show leds
    Shows a pattern on the 5x5 LED screen
  • show number
    Shows a number on the 5x5 LED screen
  • show string
    Shows text on the 5x5 LED screen
  • clear screen
    Turns off all LEDs on the screen
  • on button A pressed

    Runs code when the A button is pressed
  • on shake
    Runs code when the Micro:bit is shaken
  • button A is pressed
    A Boolean block that checks whether the A button is pressed
  • is shake
    A Boolean block that checks if a particular gesture (shake) has been made
  • on loud sound
    Runs code when the surrounding sound is loud
  • on logo pressed
    Runs code when the logo on the Micro:bit is pressed
  • sound level
    A variable block that returns the value of the sound (0 to 255)
  • set index to
    Used for setting a value of a variable
  • change index by
    Used for changing a value of a variable by a value (positive for increment, negative for decrement)
  • if-then
    Allows to use conditional statements in code
  • while
    Repeats the code inside the block until the condition inside is satisfied
  • for index from to
    Repeats the code inside for a set number of times, the index variable can be used to get the current loop, starting from 0
  • set List to
    Used to create arrays (lists) in MakeCode
  • list insert at
    Inserts a value in the specified list at the beginning, end, or a specified index
  • remove first value from list

    Removes the first value from the list
  • remove last value from list

    Removes the last value from the list