FTWCODE - PROGRAMMING PLATFORM
Code Hopper
This lesson uses FTWCODE to create code and to connect to and navigate the Hopper Drone. FTWCODE can be accessed at: www.ftwcode.com
Block-Based Coding - FTWCODE
Block-based programming in FTWCODE features a drag-and-drop capability
Blocks are snapped and stacked on top of each other to form actions
Blocks can be dragged and rearranged, and include common functions found in most programming languages
Types of Blocks - FTWCODE
Closed Blocks:
The “Program Start” block and the “Functions” blocks are the only blocks that are considered Closed Blocks
Blocks can be placed inside of them but they cannot be placed inside of any other blocks
Snap Blocks - FTWCODE
Snap blocks are any type of block that can be placed inside of a Closed Block
Snap Blocks often feature selectable elements
For example - the fly block lets you choose direction from a drop down, and enter time and power setting
Building Code - FTWCODE
Blocks are only considered active when they are solid in color
“Program Start” is always active and will always be solid
Snap blocks will look "greyed out' when they are not active or inside of a closed block
“Program Start” - FTWCODE
FTWCODE uses “Program Start” as the initial command (pictured below)
To start programming, select the General category
This will expand the General category available block set
Drag the “Program Start” block onto the work area
Programming in FTWCODE
After “Program Start”, each command needed is added in the order necessary to solve the problem and complete the code
Problem:
Program the drone to take off, hover, turn in a circle to the right, and then land
Solution:
Executing the Code
Once you have developed your code, you will need to connect to the drone and run the program
Connecting to the Hopper - FTWCODE
Enable the computer’s Bluetooth function (desktop, laptop or Chromebook)
Select DRONE in the upper left-hand corner
Select CONNECT to bring up the pairing window
Select your individual drone which is identified by its unique six (6) digit serial number
Click on PAIR
Your drone will now be connected and its current battery level will be displayed
Run the Code
Once the drone is connected, you may hit the RUN button to execute the code that you have programmed
Algorithm
a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer
Closed Block
A type of coding block in which other blocks can be placed inside of them but they cannot be placed inside of any other blocks.
Code
Code is a term used to describe text that is written using the protocol of a particular language by a computer programmer
Functions
A function is a block of organized, reusable code that is used to perform a specific action
Program
detailed plan or procedure for solving a problem with a computer;
Snap Block
A type of coding block that can be placed inside a closed block.
CODING INTRODUCTION
FTWCODE - PROGRAMMING PLATFORM
CODING EXERCISES - BASIC