Secure data upload to openSenseMap
In Blockly you have the possibility to perform various mathematical operations. You can calculate numbers, create random numbers and distribute values to another value range.
In Blockly you can perform various mathematical calculations. The following blocks are available:
In Blockly you can get random numbers. There are two different blocks available.
With the block ‘integer random value’ you can have an integer random value from a defined value range output.
With the block ‘Random number (0.0-1.0)` you can output a random decimal number between 0.0 and 1.0.
With the ‘Distribute Value’ block you can distribute numbers, e.g. measured values, to a new value range (mapping). This is useful if you want to convert your measured values directly into a percentage between 0 and 100.
At the free block sections, the limits of the original and the limits of the new value range must be defined using the ‘number’ blocks.
In the following example, the entire value range of the brightness sensor (from 3 to 200,000 lux) is distributed over a new value range from 0 to 100.