I ran into a glitch in mBlock5 (this worked perfectly in mBlock3), which has a lot of impact on the lesson-material i made so far.
I use potentiometers to control LEDs and servo’s. To make use of the complete range of the potentiometer i calculate the scale. For example if i want to control the brightness of a LED, i will calculate the scale by dividing the range of the potentiometer (1024) by the range of the LED-channel (255). In this case the scale is 4.015686274509804.
A long number, but i’m not bothered, because i store it in a variable, and this works OK in mBlock3.
In mBlock5 however this somehow results in a potentiometer-value that is divided by 1000. But only when there are more than 8 digits behind the decimal point, otherwise it works fine (see picture).
@tech_support: Can you check with the engineers if there is a way to fix this?
I would upload an mBlock-file if i could, but the forum software won’t let me.
You can download it here: calculate_scale_mbot_test.mblock