Lesson 24 Programming Refresher
Lesson 24 Programming Refresher
Blocks
Blocks are a visual programming tool that is run through a web browser
Each “block” is made up of a preset piece of code that can be dragged and dropped
There is an option in the Blocks programming tool to show the written Java code that
makes up each block
This is a powerful tool for learning programming
How to Start “Blocks”
1. Click “Configure 2. Click “New” 3. Click “Control Hub Portal” 4. Click “Control Hub”
Robot”
Configuration with Pictures! (Continued)
You’re now on the Hardware Screen where you can configure Motors, Servos,
and Sensors
The process for configuring all devices is similar:
Specify what you want to configure (Motors, Servos, Digital Devices, etc.)
Specify what type of device is on each port
Give each device a unique name
Configuration with Pictures! (Continued)
Saving your Configuration File
The Call block will tell all of the blocks below it to wait until the start command is
given on the Driver Station
Any Blocks above the Call block will start right when the OP Mode is first selected
Placing Blocks above the Call block is typically used for defining variables
Programming Motors
To program a motor, you must follow the path below to find the motor block
Once selected, you can click the drop down menu to determine what motor
you’d like to use