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!
Explore Blockly Interface
Open the Blockly editor and get familiar with its command center to start coding your drone!
First Flight Program
Create your first Blockly program to command your CoDrone Pro to takeoff and land!
Basic Flight Commands
Expand your coding skills with hover, emergency stop, and a push-up challenge!
Flight Directions
Program your CoDrone Pro to move forward and explore 3D flight! Learn more at Robolink's Flight Directions.
-
I read Through Requirements for running Blockly
I am running Windows 10 with Version 1803 or greater
If you are using Mac OS, you should have 2012 hardware or newer.
Check Bluetooth is enabled and on.
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.
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
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:
Use the "go for seconds" block from the flight commands menu.
Select the direction (FORWARD) from the drop-down menu.
Enter the number of seconds for the drone to move. Default power is set to 50% Leave it there
Go over your connection and safety routines
Test Code - (Run Code)
Save as "Time Flight"
Go for a Certain Amount of Time:
Use the "go for seconds" block from the flight commands menu.
Select the direction (FORWARD) from the drop-down menu.
Enter the number of seconds for the drone to move. Default power is set to 50% Leave it there
Go over your connection and safety routines
Test Code - (Run Code)
Save as "Time Flight"
-
Turn, (With Time, with Power, 180 Degrees)
The steps for learning turns with CoDrone Blockly Jr. include:
Programming Turn Commands: Use blocks to program the CoDrone to turn left or right.
Setting Turn Duration or Angle: Specify the duration or angle for the turn using appropriate blocks.
Combining Turns with Other Movements: Integrate turn commands with other flight movements like forward or backward.
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!
Take Off: Use the "takeoff" block.
Hover: Add a "hover" block for stability.
Turn Right: Insert a "turn right" block set for 2 seconds.
Hover: Add another "hover" block to stabilize after turning.
Land: End with the "land" block.
Practice Exercise 2: Square Flight Pattern
Take Off: Use the "takeoff" block.
First Side: Move forward for 2 seconds, then turn right 90 degrees.
Second Side: Move forward for 2 seconds, then turn right 90 degrees.
Third Side: Move forward for 2 seconds, then turn right 90 degrees.
Fourth Side and Land: Move forward for 2 seconds, turn right 90 degrees, and land.
Practice Exercise 3: Zigzag Pattern
Take Off: Use the "takeoff" block.
First Move: Move forward for 2 seconds, then turn left 45 degrees.
Second Move: Move forward for 2 seconds, then turn right 90 degrees.
Repeat Pattern: Repeat the forward and turn sequence for a total of three zigzags.
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.
Simple Addition Check
Objective: Program the CoDrone to react based on a math condition.
Condition: If 3 + 2 equals 5.
Action: Then, the CoDrone will take off.
Else: The CoDrone will stay on the ground.
Test: Run the program to check if the CoDrone takes off.
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.
Condition: If 7 is greater than 4.
Action: Then, the CoDrone will flash its LED lights.
Else: The LED lights will remain off.
Test: Run the program to see if the LEDs flash.
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.
Condition: If 10 - 3 equals 7.
Action: Then, the CoDrone will spin in a circle.
Else: The CoDrone will hover in place.
Test: Run the program to see if the CoDrone spins.
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.
Create Variables: Create variables named "x" and "y."
Set Initial Values: Set "x" to 3 and "y" to 2.
Move Right: Use the "x" variable and Flight Directions to move right by 3 units.
Move Forward: Use the "y" variable and Flight Directions to move forward by 2 units.
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.
Create Variables: Create variables named "x" and "y."
Set Initial Values: Set "x" to 10 and "y" to 10.
Move Command: Use the "x" and "y" variables to control the CoDrone's movement distance.
Change Values: Adjust "x" to 15 and "y" to 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.
Create Variables: Create variables named "x" and "y."
Set Initial Values: Set "x" to 7 and "y" to 7.
Condition Check: If "x" is equal to "y," move forward.
Change Values: Set "x" to 10 and "y" to 7.
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.
For more detailed examples and instructions, visit Robolink's CoDrone Blockly Jr Loops Lesson
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
Access Blockly: Open the CoDrone Blockly interface.
Find the While Loop Block: Go to the "Loops" category in the Blockly toolbox. Drag the "while" block to the workspace.
Set the Condition: Define the condition that needs to be true for the loop to execute. Example: while (battery level > 20%).
Add Actions: Place the actions you want to repeat inside the while block. Examples: move forward, turn left, etc.
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:
Open the Lights menu.
Drag the "set arm LEDs to" block to the workspace.
Click on the color parameter and choose a color (e.g., red, blue, green).
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
Open Blockly Interface: Access the CoDrone Blockly interface.
Create Morse Code for SOS: S: ... (dot-dot-dot) O: --- (dash-dash-dash) S: ... (dot-dot-dot)
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).
Can you use loops here?
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
Add a repeat while block and snap in a code is running block.
Add an if do block and snap when t key pressed and a take off block to the if do.
Repeat same process with l key press and land blocks
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.
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.
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.
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.
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)
Right click one of the if do blocks and duplicate.
change the when ___ key press block to the "up" arrow.
change the go block input to go forward (pitch).
⬅️ Pitch Backward (Move Backward)
Right click one of the if do blocks and duplicate.
change the when ___ key press block to the "down" arrow.
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
Right click one of the if do blocks and duplicate.
change the when ___ key press block to the "left" arrow.
change the go block input to go left(roll).
Coding Roll Right
Right click one of the if do blocks and duplicate.
change the when ___ key press block to the "right" arrow.
change the go block input to go right(roll).
Basic Flight Exercises
Master basic turns to navigate your CoDrone Pro with precision!
Square Flight Pattern
Program your CoDrone Pro to fly in a square pattern!
A square has four equal sides and four right angles (90° each), totaling 360°. It’s a balanced shape, perfect for drone flight patterns!
Zigzag Pattern
Program your CoDrone Pro to fly in a zigzag pattern!
Shapeshifter Challenge
Create geometric shapes in flight, from triangles to octagons!
Conditionals
Use conditionals to make your CoDrone Pro react to logic!
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.
Variables
Control your CoDrone Pro with dynamic variables!
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.
Loops
Use loops to make your CoDrone Pro repeat actions efficiently!
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.
LED Programming
Light up your CoDrone Pro with vibrant LED patterns!
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.
Remote Control
Control your CoDrone Pro with keyboard-based remote commands!
🌟 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.
🧠 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!
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)
Drone Games (5–7 min each)
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):
- A pinecone from a pine tree (1 point)
- A smooth quartzite pebble from the trail (1 point)
- A fern frond on the forest floor (2 points)
- A wildflower (observe, don’t pick) (3 points)