CODE

Navigating CODE

Before flashing your first program to your Cubelets, let's look at what you'll see when you visit CODE.

The CODE interface has several parts:


Let's look at each piece individually.


Network Graph

The network graph is an abstract view of your robot construction. Each node (the colored rounded-boxes with numbers inside them) corresponds to a Cubelet in your robot. The color of each node corresponds with the color of the Cubele it represents. In order to specify which Cubelet you want to reprogram or to control remotely, you first select a node on the graph. When you select a Cubelet, the green LED on the Cubelet will stop blinking and stay on. That way you know which Cubelet you have selected when you have more than one of the same Cubelet types in your robot. Each Cubelet has a unique ID number, which is shown in the node in the network graph. It's very useful to know this ID when reprogramming a Cubelet to interact with other specific Cubelets.


My programs

The programs you write are stored in the Projects List. When you write a Cubelets program that you want to flash later, press the Save button, and the program's name will appear in your Projects List. To rename or delete a program, hover your cursor over the program's name.


Sample Programs

Programs listed under samples are programs that we've written as examples of programs you might want to flash to your Cubelets. You can modify these programs and save them to your own projects list. Select a sample program from the list and the program will appear in the Code Window.


Documentation/Links

You'll find links to helpful information for using CODE in the Documentation area. This includes the reference for the CODE API, link to relevant forums and this guide.


Cubelet Info

After you select a Cubelet from the network graph, the Cublet Info area will show basic information about the Cubelet, including the Cubelet's manufacture date and the version of firmware it's running. Here you can also view the code currently running on the Cubelet, or view the code that was originally installed on that Cubelet at the factory.


Code Window

The Code Window is where you write or modify programs for your Cubelets.


Save, Check, Flash Buttons

Below the Code Window are three buttons: Save, Check, and Flash. The Save button lets you store the code you wrote in the code window above. Any program you save will be listed in your Projects List. The Check button does two things when selected. First, it checks your program and reports any problems. Second, it turns the code you have written into something that your Cubelet can understand. In order for the check button to be enabled, a Cubelet must be selected from the network graph. When you press the Flash button, the program in the Code Window is sent to the target Cubelet (the one selected in the network graph). The Flash button remains grayed-out until you've selected a target Cubelet from the network graph, and you've asked CODE to check the program in the Code Window by pressing the Save button.


Remote Control Area

In the Remote Control area you can interact with your Cubelets from your Web browser without reprogramming them. You can override the block value of Cubelets or read the current block value of Sense Cubelets.



Next

Next let's walk through flashing a Cubelet with a new program.


Continue to write a Hello World! program.