Resources for FTC Blocks Programming
Blocks Programming is included in the FTC Robot Controller app and does not require you to install a Software Development Kit (SDK) to use it. The latest released version can be found by using Google Play Store from an Android device with Internet access and searching for FTC Robot Controller. You can install it on your Robot Controller phone and the companion FTC Driver Station app (also found on Play Store) on your Driver Station phone.
FIRST Programming Resources Page that includes Blocks Programming information:
Questions about Blocks Programming can be posted using this Blocks Programming sub-forum. Before posting a new question please review previous posts as your question may already be answered.
Version 3.3 and higher of the FTC Robot Controller app includes sample op modes that demonstrate how to use various features. To view these samples, click on the “Create New Op Mode” button, specify a name for the new op mode, and in the “Sample:” drop down list, select one of the examples. Here’s a list of the sample op modes currently available:
Modern Robotics has posted a diagnostic program called Core Device Discovery that you may find useful. It communicates directly with the Core modules using a USB port on you Windows or Mac computer.
|Information about Blocks Programming
FIRST has provided three programming environments:
Using Java is a good option for teams that have a coach or mentor with Java expertise. App Inventor and Blocks Programming are good choices for new teams and teams where the programming will be done by members without prior Java experience.
We have created a Blocks Programming Reference Manual. (Updated 2/7/2019)
There are three ways to print an op mode program using Windows. In all three cases you start by displaying the op mode program using your web browser.
(1) Click on “Download Image of Blocks” button toward the top. Save the PNG image file on your computer. If you have a Windows computer, select Paint in the Windows Accessories sub-menu. From Paint open the PNG file. Use File-Print-Page Setup and then use the Scaling feature to select enough pages to assure the blocks in your op mode will be large enough to read. For instance, if your op mode is fairly long, you may need to be spread it across five pages by specifying “Fit to: 1 by 5 pages.” Then use File-Print to print the image. If your printer is on your Local Area Network (LAN), you’ll need to disconnect the WiFi connection between your Windows computer and your phone and connect your computer to your LAN before you request the Print.
(2) If you have a printer directly connected to your computer, then print it using the browser’s print feature (usually in the File menu). If your printer is on your Local Area Network (LAN), you’ll need to disconnect the WiFi connection between your Windows computer and your phone and connect your computer to your LAN. Then print the program from your browser. If your browser doesn’t print the whole program, try clicking the zoom-out (minus) symbol in the lower right part of the browser screen to get all or most of the program on the screen and then print again.
(3) Use the PrtSc key on your keyboard to capture a screen shot. Then start the Windows Paint program. (You’ll find it under Windows Accessories in the main Windows menu.) In Paint use the Paste button from the Home menu or just press control-V to place the screen shot on the Paint canvas. Then use Paint’s File Print to print the screen shot. (Per above you may need to switch your computer from being connected to your RC phone to being connected to your LAN to do this.) If you didn’t capture the whole program in the screen shot, go back to the web browser, scroll down and repeat the process. (You probably won’t need re-connect to your RC phone to scroll the op mode already displayed by your browser.)
C. Click on “Download Offline Blocks Editor”.
This will place a Zip file in the Download directory of your PC.
D. You can now disconnect from the Robot Controller phone
E. When you are ready to perform offline editing proceed as follows:
To edit other op modes repeat steps 4 and 5 above.
When you are finished with offline editing and have access to your robot controller phone, reconnect to the Robot Controller phone via WiFi.
If you saved additional BLK files, click on “Blocks” and repeat steps 2 through 5.
Note: There are some subtleties of using the “Download Offline Blocks Editor” button more than once will be explained here later.
You may want to move your op modes from the first Robot Controller (RC) phone to another either because you are placing a phone or you want to have a back-up phone at a competition. If so, you can proceed as follows:
(1) Establish a WiFi connection from your computer to your RC phone.
(2) Use your web browser on your computer to access the list of op mode programs on your Robot Controller phone.
(3) Click on the box to the left each op mode that you want to copy to the second RC phone.
(4) Click on Download Selected Op Modes and wait for the downloads to complete.
(5) Instruct your computer establish a WiFi connection to the second RC phone, disconnecting from the first phone.
(6) Use the web browser on your computer to access the list of op mode programs on the second RC phone, which may be empty.
(7) Click on the Upload Op Mode button, select Choose File and browse to one of the op modes you previously downloaded to your computer. Select Open.
(8) Repeat step (6) for each of the op modes you previously downloaded.
As discussed earlier, there are over a dozen sample op modes available from a drop-down menu when you create a new op mode. Here are some additional sample op modes. You can download them to your computer (by right clicking) and then use the Upload Op Mode button on the Blocks main menu to add them to your list of op modes. Review the comments in each sample for information on connecting motors and sensors and setting up a matching config file. All of these op modes are intended to be used during the Autonomous period. Display the op mode by selecting it from the list after you have uploaded it. If it is labeled as TeleOp to the right of its name, change it to Autonomous and Save it. This will cause it to correctly appear in the left menu on the Driver Station menu.
Support for Blocks Programming