Lesson 2C: Blockly Intro

Access printable worksheets and guides for Blockly activities via a Google Drive folder. Visit the folder to download them. These resources aid hands-on coding practice.

Explore a narrative that sets the context for your coding mission. Visit the section to read or watch it. The story motivates the lesson’s coding challenges.

Solve an AI-generated prompt to spark creative coding in Blockly. Visit the section to view the challenge. It promotes innovative problem-solving.

Engage with a life lesson or motivational message to build resilience through coding. Visit the section to get inspired. These challenges foster perseverance and growth.

Reinforce Blockly skills using Quizlet and Blooket to practice terms and concepts. Visit the section to engage with exercises. Activities focus on loops, variables, and more.

Code drone movements in Blockly for playful, hands-on learning. Visit the section to begin. This blends fun with practical coding skills.

Assess your understanding of Blockly and lesson concepts with a quiz. Visit the section to test yourself. It helps solidify your learning.

The Story

Intro to Blockly Flight

Prepare your system to code your CoDrone Pro with Blockly, inspired by the Wright brothers' pioneering spirit!

"Success is not final, failure is not fatal: it is the courage to continue that counts." — Winston Churchill
Verify system: Ensure Windows 10 (Version 1803 or greater) or Mac OS (2012 hardware or newer).
Enable Bluetooth: Check that Bluetooth is enabled and on in your system settings.
Update Chrome: Confirm Google Chrome is the latest version for optimal Blockly performance.

Explore Blockly Interface

Open the Blockly editor and get familiar with its command center to start coding your drone!

"The journey of a thousand miles begins with a single step." — Lao Tzu
Open Blockly: Launch the Blockly for CoDrone Pro editor at Blockly for CoDrone Pro.
Observe interface: Explore the left toolbox (Motion, Flight Commands, etc.), center workspace, and right-side Download/Run buttons.
Save workspace: Go to the top-left menu, click “Save,” and practice saving your workspace to learn this key habit.

First Flight Program

Create your first Blockly program to command your CoDrone Pro to takeoff and land!

"Every great achievement starts with the decision to try." — John F. Kennedy
Add takeoff: Open the Flight Commands menu in Blockly for CoDrone Pro and drag the "takeoff" block to the center workspace.
Add land: Drag the "land" block from Flight Commands and connect it below the "takeoff" block.
Connect drone: Click the green "PAIR" button (bottom-left), select "Petrone" (check drone underside for number), or use "Pair with Previous" if reconnecting.
Run code: Click “Run code” (top-left) to make your drone takeoff, hover briefly, and land. Click “Stop” if needed.
Save program: Save your program as "First Flight" via the top-left menu’s “Save” option.

Basic Flight Commands

Expand your coding skills with hover, emergency stop, and a push-up challenge!

"Innovation distinguishes between a leader and a follower." — Steve Jobs
Add hover: Drag the "hover for _ seconds" block from Flight Commands, connect it below "takeoff," and set to 5 seconds.
Create emergency stop: Drag a "when _ key press" block from Keyboard Inputs, select a key (avoid backspace), and add an "emergency stop" block from Flight Commands inside it.
Push-up challenge: Program the drone to takeoff and land repeatedly (like push-ups) using a loop from Control Loops for efficiency. Run and test.
Save program: Save as "Push-Up Flight" via the top-left menu’s “Save” option.

Flight Directions

Program your CoDrone Pro to move forward and explore 3D flight! Learn more at Robolink's Flight Directions.

"The desire to fly is an idea handed down to us by our ancestors who... looked enviously on the birds soaring freely through space." — Wilbur Wright
Add forward movement: In Blockly for CoDrone Pro, drag the "go for _ seconds" block from Flight Commands, select "FORWARD," set to 3 seconds, and keep default 50% power.
Connect and review: Reconnect your drone via the "PAIR" button and review safety steps from previous lessons.
Run code: Click “Run code” to test the forward movement, ensuring the drone moves smoothly.
Save program: Save as "Time Flight" via the top-left menu’s “Save” option.
Mission Complete! Your CoDrone Pro is coded to fly! Reach new heights!
Taste flight, eyes ever skyward. — Leonardo da Vinci
    1. I read Through Requirements for running Blockly

    2. I am running Windows 10 with Version 1803 or greater

    3. If you are using Mac OS, you should have 2012 hardware or newer.

    4. Check Bluetooth is enabled and on.

    5. Google Chrome version is the latest

  • "Risin' up to the challenge of our rival."​

    Just as Will is about to command the CoDrone Pro to take flight, this line encapsulates the essence of facing new challenges head-on with courage and determination. It's a reminder that every great achievement begins with the decision to try.​

    🎵 Motivational Song: "Eye of the Tiger" by Survivor

    This classic track is synonymous with rising to challenges and pushing through obstacles. Its driving rhythm and empowering lyrics have inspired countless individuals to stay focused and resilient.

    Let this song fuel the moment as you (and Will) embark on this journey into coding and drone piloting, embracing the spirit of perseverance and the thrill of new beginnings.

    Open Blockly

    Will sat down at the laptop again, heart thudding with a quiet kind of excitement.

    The CoDrone Pro sat ready nearby — still, silent, trusting.

    But before it could lift, he had to give it instructions — clear, deliberate, and real.

    Grandma Eileen clicked open a new window on the laptop, pulling up the program she had bookmarked earlier: Blockly for CoDrone Pro.

    The screen filled with simple panels and bright colors — blue, green, orange, and red blocks organized into sections: Motion, Flight Commands, Control Loops, Events, Lights, and Sounds.

    Each block had notches, like pieces of a digital puzzle waiting to be snapped together.

    Observe the Interface

    Will leaned in, scanning the layout.

    On the left side: Toolboxes filled with categorized coding blocks. In the center: A blank workspace, waiting for him to build his first sequence. On the right: Download and Run buttons, ready to send instructions to the drone — once he was ready.

    “So this is how I talk to it?” Will asked, keeping his voice low, like he was inside a cockpit already.

    “This is your command center,” Grandma Eileen said softly. “You don’t steer a drone with your muscles. You steer it with your mind.”

    Will hovered the mouse over the Flight Commands toolbox and saw his first option: Takeoff.

    He smiled slightly.

    Elisabeth, watching from behind, tilted her head. “It’s like crafting moves in a strategy game,” she said. “Every block, a decision. Every decision, a consequence.”

    Will nodded, already feeling the puzzle pieces fitting into place.

    Flight was no accident. Flight was built — one clear command at a time.

  • Will clicked his first few blocks into place — Takeoff → Land — the start of something small, but real.

    Open the Flight Commands Menu on the left.

    Drag "takeoff" to the workspace in the middle of the page.

    Open the Flight Commands Menu again and Drag "land" to the workspace in the middle of the page. Connect the block to the Takeoff Block.

    If you need to delete blocks, separate what you want to get rid of from your code and drag them to the trashcan in the lower righthand corner.

    He reached toward the “Run” button instinctively.

    “Not yet,” said Grandma Eileen, her voice low but firm.

    He froze. “What did I miss?”

    “Nothing,” she said. “Except the one habit every great pilot, coder, and builder learns early.”

    She pointed to the corner of the screen.

    Learn to save.

    You can do this by going to the menu in the upper lefthand corner of the workspace and clicking on “Save”.

    To open a saved program, go to the same menu and click on “Open…”.

  • Want to see what your code looks like in Python??  Click on one of the coding lcon in the top right.

    CONNECT your drone

    Once you’re ready to run your code, connect to your CoDrone by clicking on the green PAIR button in the bottom lefthand corner.

    A list of devices should come up. Select the one that says “Petrone (sometimes # is on the underside of your drone)”.

    Once you have connected your drone and want to use the same one next time, click on “Pair with Previous” instead.

    Review the Safety Steps Checklist leaned in previous lessons.

    On the top lefthand side of your workspace Click on “Run code”.  If you followed the above instructions, your drone should take off, hover for a second or two and land.

    If you need to stop your drone for any reason during its flight, click on “Stop”, which is right next to the “Run code” button..

    SAVE as "First Flight"

    History Lesson: The Wright brothers, Orville and Wilbur, made the first controlled, powered, and sustained flight on December 17, 1903, in Kitty Hawk, North Carolina.

    Quote: "The desire to fly is an idea handed down to us by our ancestors who... looked enviously on the birds soaring freely through space." — Wilbur Wright.

    History Lesson: The Wright brothers, Orville and Wilbur, made the first controlled, powered, and sustained flight on December 17, 1903, in Kitty Hawk, North Carolina.

    Quote: "The desire to fly is an idea handed down to us by our ancestors who... looked enviously on the birds soaring freely through space." — Wilbur Wright.

  • FLIGHT COMMANDS

    Take off & Land

    “The beginning is the most important part of the work.” —Plato

    1. Click on the blue flight commands menu. Look at all the possible commands.  The take off and land blocks should be at the top!

    Add a take off to your  workspace by dragging it out.

    Add a land to your workspace by dragging it out.  Attach the blocks together!

    Hover

    If you want your CoDrone to hover for more than three seconds, there is a way to do that!

    • Find the hover for _ seconds block in the flight commands menu and connect it to the bottom of the take off block.

    • Next, type in the number of seconds you would like your CoDrone to hover for.

      Emergency Stop

      There might be times when your CoDrone is about to crash into something, and you need to have it make an emergency stop before it does serious damage.

      • If you want your CoDrone’s motors to stop without crashing into the ceiling first, program a kill switch by dragging a rounded when _ key press block from the gray keyboardinputs menu into the workspace. This should be the block that doesn’t have a connector on the side!

      • Pick the key you would like to use to stop your drone from the block’s drop-down menu, but as a warning, using the backspace key can sometimes delete blocks of code!

      • Next, go to the flight commands menu, find the emergency stop block, and drag it into the when _ key press block.

      Note: this will be a separate program but will be in the same workspace!

      Flight Commands Basic Challenge

      Can you make the drone do push ups?

      In Other Words take off and land repeatedly? What is the most effecient way to may this happen?

      Flight Directions!

      “Beyond the edge of the world there’s a space where emptiness and substance neatly overlap, where past and future form a continuous, endless loop. And, hovering about, there are signs no one has ever read, chords no one has ever heard.”― Haruki Murakami

      Go Forward, (Basic, with Time, with Power)

      The lesson on CoDrone Blockly Jr. flight directions covers programming the CoDrone to move in various directions (up, down, forward, backward, side to side), turn, and fly specific patterns.

      Key steps include using blocks to control flight duration and power, turning for specific times or degrees, and combining commands for complex movements. A challenge encourages students to program the CoDrone to fly in geometric shapes using these commands. For more details, visit Robolink's Flight Directions.

      Understanding Movement in Air and Land:

      • Land Vehicles: Use a 2D coordinate system (x, y) for movement.

      • Air Vehicles: Operate in a 3D space, using coordinates (x, y, z) for forward/backward, side-to-side, and up/down movements.

        Go for a Certain Amount of Time:

        1. Use the "go for seconds" block from the flight commands menu.

        2. Select the direction (FORWARD) from the drop-down menu.

        3. Enter the number of seconds for the drone to move. Default power is set to 50% Leave it there

        4. Go over your connection and safety routines

        5. Test Code - (Run Code)

        6. Save as "Time Flight"

          Go for a Certain Amount of Time:

          1. Use the "go for seconds" block from the flight commands menu.

          2. Select the direction (FORWARD) from the drop-down menu.

          3. Enter the number of seconds for the drone to move. Default power is set to 50% Leave it there

          4. Go over your connection and safety routines

          5. Test Code - (Run Code)

          6. Save as "Time Flight"

  • Turn, (With Time, with Power, 180 Degrees)

    The steps for learning turns with CoDrone Blockly Jr. include:

    1. Programming Turn Commands: Use blocks to program the CoDrone to turn left or right.

    2. Setting Turn Duration or Angle: Specify the duration or angle for the turn using appropriate blocks.

    3. Combining Turns with Other Movements: Integrate turn commands with other flight movements like forward or backward.

    4. Practicing with Challenges: Apply the learned turning skills in practice challenges, such as making the drone turn at specific intervals or angles while flying.

    For detailed instructions, visit Robolink's Flight Directions.

    Practice Exercise 1: Basic Turns

    Let's PRACTICE!

    1. Take Off: Use the "takeoff" block.

    2. Hover: Add a "hover" block for stability.

    3. Turn Right: Insert a "turn right" block set for 2 seconds.

    4. Hover: Add another "hover" block to stabilize after turning.

    5. Land: End with the "land" block.

    Practice Exercise 2: Square Flight Pattern

    1. Take Off: Use the "takeoff" block.

    2. First Side: Move forward for 2 seconds, then turn right 90 degrees.

    3. Second Side: Move forward for 2 seconds, then turn right 90 degrees.

    4. Third Side: Move forward for 2 seconds, then turn right 90 degrees.

    5. Fourth Side and Land: Move forward for 2 seconds, turn right 90 degrees, and land.

    Practice Exercise 3: Zigzag Pattern

    1. Take Off: Use the "takeoff" block.

    2. First Move: Move forward for 2 seconds, then turn left 45 degrees.

    3. Second Move: Move forward for 2 seconds, then turn right 90 degrees.

    4. Repeat Pattern: Repeat the forward and turn sequence for a total of three zigzags.

    5. Land: Stabilize with a hover and then use the "land" block.

    For more detailed instructions, visit Robolink's Flight Directions.

    Challenge: Shapeshifter

    A Challenge that Codrone includes in its curriculum is to create shapes in flight!


    A triangle’s angles add up to 180 degrees. 🔼

    • A quadrilateral’s angles add up to 360 degrees.

    • A pentagon’s angles add up to 540 degrees.

    • A hexagon’s angles add up to 720 degrees.

    • An octagon’s angles add up to 1080 degrees.

  • Motivational Message: Roger Bannister's achievement reminds us that breaking barriers requires pushing past limits. Apply this mindset to your drone projects, pushing yourself to achieve what seems impossible.

    "My mission is to create a world where we can live in harmony with nature." - Jane Goodall

    What are Conditionals?

    Conditionals are statements that help programs make decisions based on whether a condition is true or false. In Blockly, conditionals include if, else if, and else statements. You use conditionals to make decisions in everyday life. Here are examples:

    If Statements:

    • If it is raining, then I will take an umbrella.

    • If I am hungry, I will eat lunch.

    If-Else Statements:

    • If it is raining, then I will take an umbrella. Else, I will wear sunglasses.

    • If I am hungry, I will eat lunch. Else, I will wait until dinner.

    If-Else If-Else Statements:

    • If it is raining, then I will take an umbrella. Else if it is cloudy, I will take a jacket. Else, I will wear sunglasses.

    • If I am hungry, I will eat lunch. Else if I am thirsty, I will drink water. Else, I will continue working.

    Conditionals in Blockly

    In Blockly, conditionals are used similarly:

    • If Statement: If the CoDrone's battery is low, then the CoDrone will land.

    • If-Else Statement: If the CoDrone's battery is low, the CoDrone will land. Else, the CoDrone will continue flying.

    • If-Else If-Else Statement: If the CoDrone's battery is low, the CoDrone will land. Else if an obstacle is detected, the CoDrone will hover. Else, the CoDrone will continue flying.

    Practice Exercise 1:

    Simple Addition Check

    Objective: Program the CoDrone to react based on a math condition.

    1. Condition: If 3 + 2 equals 5.

    2. Action: Then, the CoDrone will take off.

    3. Else: The CoDrone will stay on the ground.

    4. Test: Run the program to check if the CoDrone takes off.

    5. Modify: Change the addition equation and observe the behavior.

    Practice Exercise 2:

    Greater Than Comparison

    Objective: Program the CoDrone to react based on a comparison.

    1. Condition: If 7 is greater than 4.

    2. Action: Then, the CoDrone will flash its LED lights.

    3. Else: The LED lights will remain off.

    4. Test: Run the program to see if the LEDs flash.

    5. Modify: Change the numbers in the comparison and test again.

    Practice Exercise 3:

    Equal Value Check

    Objective: Program the CoDrone to react if two values are equal.

    1. Condition: If 10 - 3 equals 7.

    2. Action: Then, the CoDrone will spin in a circle.

    3. Else: The CoDrone will hover in place.

    4. Test: Run the program to see if the CoDrone spins.

    5. Modify: Change the subtraction equation and test the reaction.

    History Lesson: On May 6, 1954, Roger Bannister became the first person to run a mile in under four minutes, achieving a time of 3:59.4.

    Quote: "The man who can drive himself further once the effort gets painful is the man who will win." — Roger Bannister

    Motivational Message: Roger Bannister's achievement reminds us that breaking barriers requires pushing past limits. Apply this mindset to your drone projects, pushing yourself to achieve what seems impossible.

  • What are Variables?

    Variables are used to store information that can be referenced and manipulated (used) in a program. In Blockly, variables are like containers that hold values, which can change as the program runs. You use variables in daily life to keep track of changing information. Here's how you might use a variable, typically seen as “set ____ to ____”:

    • Set my age to 10.

    • Set the temperature to 75°F.

    Variables can also be updated as conditions change:

    • Set my age to my age + 1 on my birthday.

    • Set the temperature to the current temperature reading every hour.

    In Blockly, variables allow dynamic control and data management. For example:

    • Set Variable: Set altitude to 10 meters.

    • Update Variable: Set altitude to altitude + 1 meter every second.

    Practice Exercise 1:

    Setting X and Y Variables for Movement

    Objective: Program the CoDrone to move right and forward using variables.

    1. Create Variables: Create variables named "x" and "y."

    2. Set Initial Values: Set "x" to 3 and "y" to 2.

    3. Move Right: Use the "x" variable and Flight Directions to move right by 3 units.

    4. Move Forward: Use the "y" variable and Flight Directions to move forward by 2 units.

    5. Test: Run the program to see the CoDrone move right and then forward.

    Practice Exercise 2:

    Using Variables in Movement

    Objective: Program the CoDrone to move based on variable values.

    1. Create Variables: Create variables named "x" and "y."

    2. Set Initial Values: Set "x" to 10 and "y" to 10.

    3. Move Command: Use the "x" and "y" variables to control the CoDrone's movement distance.

    4. Change Values: Adjust "x" to 15 and "y" to 5.

    5. Test: Run the program to see the CoDrone move accordingly.

    Practice Exercise 3:

    Conditional Movement with Variables

    Objective: Program the CoDrone to decide movement based on variable values.

    1. Create Variables: Create variables named "x" and "y."

    2. Set Initial Values: Set "x" to 7 and "y" to 7.

    3. Condition Check: If "x" is equal to "y," move forward.

    4. Change Values: Set "x" to 10 and "y" to 7.

    5. Test: Run the program to observe the CoDrone's behavior based on the condition.

    For more detailed instructions, visit Robolink CoDrone Blockly Jr. Variables.

    Science Lesson: Charles Darwin’s theory of evolution, published in "On the Origin of Species" in 1859, fundamentally changed our understanding of life on Earth.

    Quote: "It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change." — Charles Darwin

    Motivational Message: Darwin’s work teaches us the importance of adaptability and understanding our environment. As you develop your drone skills, be open to learning and adapting, always respecting the natural world around you.

  • "Make your life a mission - not an intermission." - Arnold H. Glasgow Introduction to Loops

    Loops allow you to repeat sections of code efficiently. Blockly has three types of loops:

    • For Loops: Repeat code a specific number of times.

    • While Loops: Repeat code as long as a condition is true.

    • Until Loops: Repeat code until a condition is true.

    Using For Loops

    For loops repeat code a set number of times. Blockly offers two for loop blocks:

    • Repeat _ times: Specify a number directly or use a variable.

    • Count with: More advanced, using a variable to count within a range.

    Access Blockly: Open the CoDrone Blockly interface.

    • Find the For Loop Block: Locate the "Loops" category in the Blockly toolbox. Drag the "repeat _ times" block or the "count with" block to the workspace.

    • Set the Loop Count: For "repeat _ times": Enter the number of iterations directly. For "count with": Define the variable, start value, end value, and step size.

    • Add Actions: Place the actions you want to repeat inside the loop block. Examples include moving the drone, changing LED colors, or playing sounds.

    • Run the Program: Upload the code to your drone and observe the repeated actions.

    While Loops

    While loops repeat code while a condition is true. Use them to perform actions repeatedly based on dynamic conditions.

    Until Loops

    Until loops function like while loops but run until a condition is true, useful for tasks needing repetition until a specific event occurs.

    Explore more at Robolink's CoDrone Blockly Jr Loops Lesson.

    While Loops

    1. Access Blockly: Open the CoDrone Blockly interface.

    2. Find the While Loop Block: Go to the "Loops" category in the Blockly toolbox. Drag the "while" block to the workspace.

    3. Set the Condition: Define the condition that needs to be true for the loop to execute. Example: while (battery level > 20%).

    4. Add Actions: Place the actions you want to repeat inside the while block. Examples: move forward, turn left, etc.

    5. Run the Program: Upload the code to your drone and observe the repeated actions until the condition is false.

    Practical Examples

    • Program a Stair-Climbing Drone: Use for loops to make the drone ascend steps without touching the steps or with landding on each step.

    • Shape-Flying Drone: Use while loops to fly in geometric patterns this time with loops instead of repeating steps of code over and over.

    • Disco Drone Challenge: Use loops to create dynamic LED light patterns on the drone, like a disco ball. Add music to make it more interesting.

  • What is an LED? 💡

    An LED (Light-Emitting Diode) is a small electronic component that emits light when electricity passes through it. Unlike traditional incandescent bulbs, which use a filament that heats up to produce light, LEDs use a semiconductor to emit light. This makes LEDs much more energy-efficient and longer-lasting.

    What is an LED? 💡

    An LED (Light-Emitting Diode) is a small electronic component that emits light when electricity passes through it. Unlike traditional incandescent bulbs, which use a filament that heats up to produce light, LEDs use a semiconductor to emit light. This makes LEDs much more energy-efficient and longer-lasting.

    LEDs on Your CoDrone

    The CoDrone has 6 RGB LEDs: one on each of the four arms, one for the eyes, and one for the tail. These LEDs can be programmed to display a wide range of colors, not only making the drone look cool but also providing important feedback. For example, the tail light shows the drone's connection status: a solid green means it's connected, while a flashing green means it's in pairing mode. While the tail light's color is fixed, you can program the other LEDs to display any color and pattern you want.

    Parameters for CoDrone LED Controls

    CoDrone allows you to control the arm LEDs, eye LEDs, or both through the Lights menu. Each LED block has several parameters:

    • Color: Click on the color to open a menu and choose the desired LED color.

    • Brightness: For solid LED blocks, set the brightness from 0 (off) to 100 (full brightness).

    • Mode: Choose the light pattern: BLINK: LEDs flash on and off. DOUBLE BLINK: LEDs flash twice before turning off. DIMMING: LEDs fade in and out.

    • Interval: Set the frequency (per second) for light patterns, ensuring the interval value is positive

    Practical Elementary Exercises with CoDrone LED Parameters

    Exercise 1: Color Fun

    • Objective: Change the color of the drone's LEDs.

    • Instructions:

    1. Open the Lights menu.

    2. Drag the "set arm LEDs to" block to the workspace.

    3. Click on the color parameter and choose a color (e.g., red, blue, green).

    4. Upload the code and observe the LEDs change color.

    Practical Elementary Exercises with CoDrone LED Parameters

    Exercise 2: Light Patterns

    • Objective: Explore different light modes.

    • Instructions: Select the "set arm LEDs to" block. Choose a mode: BLINK, DOUBLE BLINK, or DIMMING. Set the interval (e.g., 1 second). Upload the code and watch the LEDs display different patterns.

    Exercise 3: Rainbow Cycle

    • Objective: Create a rainbow cycle with the LEDs.

    • Instructions: Use multiple "set arm LEDs to" blocks. Set each block to a different color (red, orange, yellow, green, blue, purple). Arrange the blocks to change colors every 2 seconds. Upload the code and watch the LEDs cycle through colors.

    Exercise 4: Connection Status Indicator

    • Objective: Program the tail light to indicate connection status.

    • Instructions: Select the "set tail LED to" block. Program it to show solid green when connected and flashing green when in pairing mode. Test the drone by connecting and disconnecting it, observing the tail light for status changes.

    These exercises provide clear, step-by-step instructions to help understand and experiment with CoDrone LED parameters in a hands-on and engaging way.

    Challenge

    Morse Code: A communication system using a series of dots (short signals) and dashes (long signals) to represent letters, numbers, and punctuation. It was historically used in telegraphy and radio communications.

    • Dot: Short signal (e.g., short blink)

    • Dash: Long signal (e.g., long blink)

    Exercise: Using Morse Code with Drone LEDs

    Objective

    • Program your drone's LEDs to blink in Morse code to spell "SOS" (the universal distress signal).

    Instructions

    1. Open Blockly Interface: Access the CoDrone Blockly interface.

    2. Create Morse Code for SOS: S: ... (dot-dot-dot) O: --- (dash-dash-dash) S: ... (dot-dot-dot)

    3. Program Dots and Dashes: Use the "set arm LEDs to" block. For dots: Set a short blink (e.g., 0.2 seconds on, 0.2 seconds off). For dashes: Set a long blink (e.g., 0.6 seconds on, 0.2 seconds off).

    4. Can you use loops here?

    5. Arrange Blocks: Sequence the blocks to create ... --- ... with appropriate delays between letters (e.g., 0.6 seconds).

    Science Lesson: On March 2, 1972, NASA launched the Pioneer 10 spacecraft, which became the first human-made object to travel through the asteroid belt and provide close-up images of Jupiter.

    Quote: "Exploration is really the essence of the human spirit." — Frank Borman

    Science Lesson: On March 2, 1972, NASA launched the Pioneer 10 spacecraft, which became the first human-made object to travel through the asteroid belt and provide close-up images of Jupiter.

    Quote: "Exploration is really the essence of the human spirit." — Frank Borman

  • Traditional Remote Control Functions

    RC controllers for drones typically use two joysticks:

    • Left Stick (Throttle + Yaw) Up/Down → Increase/Decrease throttle (altitude) Left/Right → Yaw (rotate clockwise or counterclockwise)

    • Right Stick (Pitch + Roll) Up/Down → Pitch forward/backward (move forward/backward) Left/Right → Roll left/right (move side-to-side)

    🧠 Real World Connection

    Think of your drone remote like a game controller. The left stick is your power and spin control. The right stick is how you move across the sky — forward, back, side to side — just like controlling a spaceship or racing car!

    🧠 Real World Connection

    • 🎯 Throttle is like hitting the gas in a car game.

    • 🌀 Yaw is like turning the wheels left/right — but you’re spinning the whole drone!

    • ➡️ Pitch is like moving your character forward/back.

    • 🔄 Roll is like sidestepping in Fortnite, Call of Duty, or Roblox.

    Blockly Manual Control

    Blockly + CoDrone EDU: Manual Control Code (Keyboard)

    Here's how to set this up in Blockly (CoDrone EDU firmware assumed):

    1. Setup Event Listener for Keys

    Use Blockly’s when key is pressed blocks to assign movement commands.

    Takeoff / Land

    1. Add a repeat while block and snap in a code is running block.

    2. Add an if do block and snap when t key pressed and a take off block to the if do.

    3. Repeat same process with l key press and land blocks

    4. Place the if do blocks inside the repeat while

    Throttle controls how much power goes to the drone’s motors, which directly affects how high the drone goes. Think of it like the gas pedal on a car—but for going up instead of forward.

    🕹️ What Throttle Does:

    • Increase throttle → drone gains altitude (flies higher).

    • Decrease throttle → drone loses altitude (flies lower).

    • Zero throttle → drone eventually falls (unless it's hovering).

    🔧 In Drone Controls:

    • On a traditional RC controller: Left joystick up = throttle up.

    • In coding: You might see something like set throttle to 70.

    🎮 Gaming Analogy:

    In a video game, throttle is like boost or jump power—it’s how you rise off the ground.

    Ok, now let's code the throttle.

    1. Add another if do block and snap when w key pressed and add a go up for 0.5 seconds at 50% power block to the if do.

    2. Thenadd a when s key pressed and add a go down for 0.5 seconds at 50% power block to the if do.

    Yaw

    Yaw is the rotation of a drone left or right, like turning your head side to side or spinning in place. It doesn’t move the drone forward, backward, or sideways—it just changes the direction the drone is facing.

    🌀 In Drone Terms:

    • Yaw Left = Rotate counterclockwise

    • Yaw Right = Rotate clockwise

    • Controlled by the left joystick moving left or right (on a traditional RC or Xbox/PS controller setup)

    🕹️ In Gaming Language:

    Yaw is like turning your character's body or camera view in a first-person game—not moving, just facing a new direction.

    Ok, now let's code the Yaw.

    1. Add another if do block and snap when a key pressed and add a turn left for 0.5 seconds at 50% power block to the if do.

    2. Thenadd a when d key pressed and add a turn right for 0.5 seconds at 50% power block to the if do.

    Pitch in drone flight refers to the tilting of the drone forward or backward, which causes it to move in those directions.

    🧠 Simple Explanation:

    • Pitch Forward = Drone leans forward and moves ahead

    • Pitch Backward = Drone leans backward and moves backward

    🎮 Game Controller Connection:

    Think of it like pushing the right stick up or down in a video game:

    • Pushing up = your character runs forward ➡️ Drone moves forward

    • Pushing down = your character backs up ⬅️ Drone moves backward

    ✈️ Real-Life Analogy:

    Imagine a seesaw—when the front dips down, you slide forward. That’s pitch in action!

    Would you like kid-friendly visuals or a matching activity to reinforce it?

    🌀 What Happens to the Propellers During Pitch?

    A drone has 4 propellers (in a typical quadcopter), and each one contributes to movement by spinning at different speeds.

    ➡️ Pitch Forward (Move Forward)

    To tilt the front down and move forward:

    • The rear propellersspin faster → create more lift in the back.

    • The front propellersspin slower → create less lift.

    • This causes the back to rise and the front to dip, pushing the drone forward.

    ⬅️ Pitch Backward (Move Backward)

    To tilt the back down and move backward:

    • The front propellersspin faster → create more lift in the front.

    • The rear propellersspin slower → create less lift.

    • This causes the front to rise and the back to dip, moving the drone in reverse.

    ➡️ Pitch Forward (Move Forward)

    1. Right click one of the if do blocks and duplicate.

    2. change the when ___ key press block to the "up" arrow.

    3. change the go block input to go forward (pitch).

    ⬅️ Pitch Backward (Move Backward)

    1. Right click one of the if do blocks and duplicate.

    2. change the when ___ key press block to the "down" arrow.

    3. change the go block input to go backward (pitch).

    🔄 What is Roll in Drone Flight?

    Roll is the drone’s side-to-side tilt — like tipping your head to touch your shoulder. It allows the drone to move left or right along a horizontal line.

    🎮 Game Controller Comparison:

    • Roll Left = Push right stick left

    • Roll Right = Push right stick right

    Analogy:

    Roll is like when you're balancing on a skateboard. Lean left? You go left. Lean right? You go right. The drone shifts its weight the same way by adjusting how hard its left or right propellers push!

    ⚙️ How Do the Propellers Create Roll?

    The drone tilts by changing the speed of its left and right propellers:

    ⬅️ Roll Left (Move Left)

    • Right-side propellers spin faster = more lift on the right

    • Left-side propellers spin slower = less lift on the left

    • Result: Left side dips, right side rises → drone rolls left

    ➡️ Roll Right (Move Right)

    • Left-side propellers spin faster = more lift on the left

    • Right-side propellers spin slower = less lift on the right

    • Result: Right side dips, left side rises → drone rolls right

    Coding Roll Left

    1. Right click one of the if do blocks and duplicate.

    2. change the when ___ key press block to the "left" arrow.

    3. change the go block input to go left(roll).

    Coding Roll Right

    1. Right click one of the if do blocks and duplicate.

    2. change the when ___ key press block to the "right" arrow.

    3. change the go block input to go right(roll).

Safety Recommendation: For all code missions, when taking off from the ground, it is strongly suggested to add a "go up" block for 2.5 seconds after the "takeoff" block to ensure the drone clears students, desks, chairs, and other classroom obstacles.

Basic Flight Exercises

Master basic turns to navigate your CoDrone Pro with precision!

"The only limit to our realization of tomorrow will be our doubts of today." — Franklin D. Roosevelt
Add takeoff: In Blockly, drag the "takeoff" block from Flight Commands to the workspace.
Add hover: Drag a "hover for _ seconds" block, connect it below "takeoff," and set to 2 seconds.
Turn right: Drag a "turn right" block, connect it below "hover," and set for 2 seconds.
Add second hover: Drag another "hover for _ seconds" block, connect it below "turn right," and set to 2 seconds.
Add land: Drag the "land" block, connect it below the second "hover."
Test and save: Connect your drone, run the code, and save as "Basic Turns." See Robolink's Flight Directions.

Square Flight Pattern

Program your CoDrone Pro to fly in a square pattern!

"Success is the sum of small efforts, repeated day in and day out." — Robert Collier

A square has four equal sides and four right angles (90° each), totaling 360°. It’s a balanced shape, perfect for drone flight patterns!

Add takeoff and ascend: In Blockly, drag the "takeoff" block to the workspace, followed by "go up" for 1.5 seconds.
First side: Add "go forward" for 1.5 seconds, then "turn right" for 1 second at 50% power. If the turn is not exactly 90°, adjust the time or power slightly.
Second side: Repeat "go forward" for 1.5 seconds, then "turn right" for 1 second at 50% power. Adjust as needed for a 90° turn.
Third side: Repeat "go forward" for 1.5 seconds, then "turn right" for 1 second at 50% power. Adjust as needed for a 90° turn.
Fourth side: Add "go forward" for 1.5 seconds, "turn right" for 1 second at 50% power, and "land." Adjust as needed for a 90° turn.
Think efficient: Can you code the square more efficiently, maybe with a loop? Test to ensure each turn is 90°. Save as "Square Flight" before moving on!

Zigzag Pattern

Program your CoDrone Pro to fly in a zigzag pattern!

"The best way to predict the future is to create it." — Abraham Lincoln
Takeoff: Start a new program with a "takeoff" block.
First move: Add "go forward" for 2 seconds, then find a "turn left" block setting that achieves a 45° turn (hint: in Square Flight, you used "turn right" for 1 second at 50% power for 90°; try reducing time or power). Test and adjust time or power.
Second move: Add "go forward" for 2 seconds, then "turn right" using the same setting as your 45° "turn left" to maintain consistency.
Third move: Repeat "go forward" for 2 seconds, then use your 45° "turn left" setting, followed by your 45° "turn right" setting.
Finish: Add "hover" for 2 seconds, then "land." Run the program, ensure all 45° turns are accurate, and save as "Zigzag Flight."

Shapeshifter Challenge

Create geometric shapes in flight, from triangles to octagons!

"Creativity is intelligence having fun." — Albert Einstein
Plan a triangle: In Blockly, program a triangle (180° total angles) with three "go forward" and three "turn right" blocks (60° each).
Test triangle: Add "takeoff" and "land," run the code, and adjust angles if needed.
Try a shape: Code any shape (e.g., triangle, square) without help. Experiment and run your code!
Try a pentagon: Program a pentagon (540° total angles) with five "go forward" and five "turn right" blocks (108° each).
Test and save: Run the pentagon code, save as "Shape Flight," and explore other shapes (e.g., hexagon: 720°). See Robolink's Flight Directions.

Conditionals

Use conditionals to make your CoDrone Pro react to logic!

"The man who can drive himself further once the effort gets painful is the man who will win." — Roger Bannister
Addition check: Use an "if" block to check if 3 + 2 = 5; if true, add "takeoff," else stay grounded.

Lit Slang: Conditionals are straight-up lit, fam! They’re like picking if your drone yeets into the air or just vibes on the ground based on math tea.

Proper English: Conditionals are programming statements that execute actions based on whether a condition is true or false, enabling the drone to respond to specific situations, such as battery levels or calculations.

Test addition: Run the code, then modify to 3 + 3 and observe no takeoff.
Greater than check: Use an "if-else" block to check if 7 > 4; if true, flash LEDs, else keep LEDs off.
Test greater than: Run the code, then modify to 4 > 7 and observe LEDs off.
Equal value check: Use an "if-else" block to check if 10 - 3 = 7; if true, spin in a circle, else hover.
Test equal value: Run the code, modify to 10 - 5, and save as "Conditional Flight."

Variables

Control your CoDrone Pro with dynamic variables!

"It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change." — Charles Darwin
Create flightTime/flightPower variables: Create variables "flightTime" and "flightPower," set "flightTime" to 1.5 seconds and "flightPower" to 10 (power percentage, 10–100).

Slay Slang: Variables are lowkey slaying storage vibes! They hold numbers or drone moves like a GOAT keeping your game score.

Proper English: Variables are storage containers in a program that hold changeable data, such as numbers or flight distances, used to control drone movements dynamically.

Move with variables: Use "flightTime" to move right for 1.5 seconds at "flightPower"% power (10%), "flightTime" to move forward for 1.5 seconds at "flightPower"% power, then run the code.
Adjust variables: Set "flightTime" to 2.5 seconds, "flightPower" to 20 (power percentage, 10–100), run, then set "flightTime" to 4 seconds (max), "flightPower" to 50, and run again.
Conditional movement: Set "flightTime" to 2 seconds, "flightPower" to 20; if "flightTime" = "flightPower," move forward for 1 second at 50% power, else hover for 1 second. Test with "flightTime" to 2.5 seconds, "flightPower" to 30, and save as "Flying Variables." See Robolink's Variables.

Loops

Use loops to make your CoDrone Pro repeat actions efficiently!

"The only way to discover the limits of the possible is to go beyond them into the impossible." — Arthur C. Clarke
For loop basics: Drag a "repeat _ times" block from Loops, set to 3, and add "go forward" for 1 second inside.

Bop Slang: Loops are giving main character energy, repeating moves like a TikTok dance on loop! They let your drone keep flexing without extra code.

Proper English: Loops are programming structures that repeat a set of instructions multiple times, allowing efficient execution of repetitive tasks like drone movements.

While loop basics: Use a "while" block with "battery > 20%," add "turn left" for 1 second inside, and test.
Stair-climbing: Use a "for" loop to ascend steps (e.g., "go up" 1 second, 5 times) without touching steps.
Shape-flying: Use a "while" block to fly a square pattern (4 sides) and save as "Loop Flight." See Robolink's Loops.

LED Programming

Light up your CoDrone Pro with vibrant LED patterns!

"Exploration is really the essence of the human spirit." — Frank Borman
Color fun: Drag a "set arm LEDs to" block from Lights, choose red, set brightness to 100, and run.

Poppin’ Slang: LEDs are poppin’ lights that make your drone glow with big vibes, like a concert bop dropping the beat!

Proper English: LEDs (Light-Emitting Diodes) are energy-efficient electronic components that emit light, used on the CoDrone to display colors and patterns for feedback or visual effects.

Light patterns: Use "set arm LEDs to" with BLINK mode, set interval to 1 second, and test.
Rainbow cycle: Add multiple "set arm LEDs to" blocks for red, orange, yellow, green, blue, purple, each for 2 seconds.
Morse code SOS: Program arm LEDs for SOS (... --- ...) with short blinks (0.2s) for dots, long blinks (0.6s) for dashes, using a loop. Learn Morse code basics at ARRL’s Morse Code Learning Page. Save as "LED Flight."

Remote Control

Control your CoDrone Pro with keyboard-based remote commands!

"The future belongs to those who prepare for it today." — Malcolm X
Takeoff/land: Use a "repeat while code is running" block with an "if" block for "t" key (takeoff), an "else if" block for "l" key (land).
Throttle: Add "else if" blocks for "w" key ("go up" 0.5s, 50% power) and "s" key ("go down" 0.5s, 50% power).
Throttle controls the drone’s altitude (up/down movement) by adjusting motor power.
Yaw: Add "else if" blocks for "a" key ("turn left" 0.5s, 50% power) and "d" key ("turn right" 0.5s, 50% power).
Yaw rotates the drone left or right around its vertical axis, changing its heading.
Pitch: Add "else if" blocks for "up" arrow ("go forward" 0.5s, 50% power) and "down" arrow ("go backward" 0.5s, 50% power).
Pitch tilts the drone forward or backward, controlling forward/backward movement.
Roll: Add "else if" blocks for "left" arrow ("go left" 0.5s, 50% power) and "right" arrow ("go right" 0.5s, 50% power), and an "else" block to hover for 0.2 seconds. Run and save as "Remote Flight."
Roll tilts the drone left or right, controlling side-to-side movement.
Mission Complete! Your CoDrone Pro dances through the skies! Keep exploring!
Taste flight, eyes ever skyward. — Leonardo da Vinci

🌟 SkyPrompt AI Activity: CoDrone Pro

Pick a topic and a question to learn about unboxing or flying the CoDrone Pro. Copy your question to an AI (ChatGPT, Gemini, Grok) to get answers, then try new choices or make your own question to think harder.

🚖 Choose Your Co-Pilot:


🧠 Change Your Question:

Try new questions to think more about the CoDrone Pro. Click a button to see ideas or make your own:

AI Prompt

Wings of Grit & Gratitude

Have you watched the "Why Do We Fall - Motivational Video" by Mateusz M?

Why Do We Fall Quiz

Test your knowledge of the motivational principles from Mateusz M!

Question 1

What does the video say life is like, according to the Rocky Balboa quote?

Question 2

According to the video, what determines how winning is done?

Question 3

What does the video, through Eric Thomas, emphasize as the key to success?

Question 4

What does the video suggest you do when life knocks you down?

Taste of Flight Practice

Mind Break & Deliberate Play

Ready for quick Blockly coding activities?

Ready for strategic drone coding games?

Ready for a nature hike break?

Deliberate Play

Explore Blockly coding for drones with fun activities, games, and a nature hike!

Deliberate Play sparks creativity, sharpens focus, and builds problem-solving skills. Keep activities and games short (5–7 minutes) for maximum impact. Enjoy a hiking break (1–3 hours) every few days to recharge in nature!
Scoring: Earn up to 15 points: 4 for activities (1 each), 4 for games (1 each), and 7 for hiking (pinecone: 1, quartzite pebble: 1, fern frond: 2, wildflower: 3).

Coding Activities (5–7 min each)

Activity Score: 0/4

Drone Games (5–7 min each)

Game Score: 0/4

Hiking Break (1–3 hours)

Minors must be accompanied by an adult on nature trails.

Trail Suggestion: Explore Sugarloaf Mountain and Northern Peaks Trail (Dickerson, MD, 4.7 stars, 5.9 miles) for a scenic hike with wildflower views!

[](https://www.alltrails.com/us/maryland)

Find these treasures (points vary by difficulty):

Your Hiking Score: 0/7
"In every walk with nature, one receives far more than he seeks." – John Muir
Your Total Play Score: 0/15

Lesson QUIZ