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
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