Skip to main content

Hello, World

Loading...

Welcome to your first AppBlocks lesson. Naturally, this is the "Hello, World" of AppBlocks.

Each AppBlocks project is presented on three tabs -- Hardware, Features, and AppBlocks.

The TPS configuration is defined on the Hardware Tab. To add Tibbits to the configuration, drag them onto the desired socket or click on the socket and select from the list of Tibbits available for that socket. Only a power supply and a power jack Tibbits will be needed for this simple project.

helloworld_hardware

The AppBlocks tab shows the application flow as a block diagram. Blocks are added by dragging them from the left panel onto the application canvas. The flows proceed left-to-right and always start with an event block, in this case, the On Button Pressed event.

helloworld_appblocks

The "button" that causes the On Button Pressed event block to trigger is the MD button of your TPS device. Here is where the button is (and the button above it is Reset):

helloworld_appblocks

To run the application in debug mode, click the Run button at the top right corner of the screen:

helloworld_appblocks

In the debug mode, your application executes under AppBlock's supervision. There is also a release mode (often referred to as the "production mode"), in which the device runs unattended. You can only run this particular application in the debug mode because it uses the Debug Print block. Messages generated with Debug Print are shown in the **Debug Panel"", which is only available in the debug mode.

As soon as you click Run, a Device Explorer dialog will open -- you have to find your TPS device on your LAN and select it as the debug target.

Device discovery is performed by a small executable file that needs to be installed on your PC. You will be offered to do so the first time you click Run.

Once the application is running, press the MD button on your TPS. This will send the "Hello, World" message to the debug console:

helloworld_debug

Congratulations, you've just completed your first AppBlocks lesson!