Blockly Reference

Blockly is a visual programming environment designed for beginner programmers aimed to teach programming techniques. Blocky for Fusion comes with Basic and Intermediate modes which adds another level of complexity.
Basic Blockly comes with blocks to control the motors which will drive and rotate the robot. There are also blocks to toggle the on-board yellow and blue LEDs on and off.
Intermediate mode comes with more complex blocks to control motors independently, control servos and our entire range of sensors.

1) Program Environment

  • This is the space where blocks are placed and connected to create programs.
  • There are both vertical and horizontal scrolling bars for navigating larger programs.
  • The icons in the bottom right are used to help you view your environment and delete blocks.
    • The reticle is used to center the block program within the program environment.
    • The + icon is used to zoom in on the program.
    • The - icon is used to zoom out from the program.
    • The trashcan icon is used to delete a block or chunk of blocks by dragging the blocks over the trashcan.

2) Toolbox

  • Contains all available programming blocks organized by category.

3) Program Output

  • This window can be toggled on and off.
  • Displays the output of the program generated using the print block or an error from the Controller.

4) Code Window

  • This window can be toggled on and off.
  • Displays the Python code that is produced by the blocks. This code can be copied, pasted and run directly from the Editor.

5) Toolbar

  • File - Gives the option to Create, Open, Close, Save, Delete and Print a file.
  • View - Switch modes between Basic and Intermediate, also to show/hide the Program Output and Code Window.
  • Manage - Import or Export a file.
  • Help - Access controller and sensor examples as well as a link to the documentation.
  • New File - Opens a new file with Fusion import and driver lines in code.
  • Open File - Open a file that exists in the current user's file directory.
  • Save File - Save the current file that is highlighted in Working Files.
  • Save All Files - Save all the current files the Working Files.
  • Run Program - Run the current program that is highlighted in Working Files.
  • Stop Program - Stop the current running program.
  • Toggle Program Output - Show and Hide the Program Output at the bottom of the screen.
  • Toggle Code Window - Show and Hide the Code Window to the right of the Program Environment.
  • Open Virtual Gamepad - Open the Virtual Gamepad in a new tab. (Must run the program first)

Use Guide

1. Create a program (Basic & Intermediate)

Basic Block Reference

1. Control Robot
2. Move Robot
3. Rotate Robot

Intermediate Block Reference

1. Control Robot
2. Motor Control
3. Servo Control
4. USB Gamepad
5. Virtual Gamepad
6. Analog/Digital Sensors
7. Compass (45-2003)
8. Rate Gyro (45-2004)
9. Integrating Gyro (45-2005)
10. Optical Distance Sensor (45-2006)
11. Touch Sensor (45-2007)
12. Range Sensor (45-2008)
13. Infrared Locator 360° (45-2009)
14. Light Sensor (45-2015)
15. Sound Generator (45-2016)
16. Infrared Seeker V3 (45-2017)
17. Color Sensor (45-2018)
18. Color Beacon (45-2019)
19. Magnetic Sensor(45-2020)
20. Time
21. Logic
22. Loops
23. Text
24. Lists
25. Variables