1. Starting up the senseBox
Starting up the senseBox MCU
Informations for the visual programming environment Blockly for senseBox.
To get to know Blockly you write a simple program that makes the built-in LED on the senseBox blink.
This block is loaded directly when the interface is started and should always be used. The two basic functions Setup()
and Loop()
are always needed to write a working program.
All blocks within the Setup()
function are only executed once at the beginning of the program. In this function for example the display is initialized or the WLAN connection is established. All blocks that are within the Loop()
function are executed continuously. The microcontroller executes all blocks again and again from top to bottom. In the ‘loop()`, for example, the sensors are read out or the measured values are stored on an SD card or transferred to the Internet.
To switch on the built-in LED, you have to pull the ‘LED on digital’ block into an loop. Then select “BUILTIN_1” under PIN and “On” under Status.
The built-in LED can be found above the red reset button on the senseBox MCU.
To make the built-in LED flash, it is necessary to switch it off again with another ‘LED on digital’ block. In addition, a pause must be inserted after switching on and off so that the flashing is visible at all. You can find the ‘Waiting’ block in the category ‘Time’.
In dieser Series lernst du was notwendig ist, um deine senseBox über Blockly zu programieren.