Page 1 of 1
Math Libraries for Blockly
Posted: Friday 26 February 2016 15:10
by manwe
It would be very nice to have some mathematical calculations in Blockly.
This is used in lots of other Blockly Examples but just outside of Domoticz
https://developers.google.com/blockly/
https://blockly-demo.appspot.com/static ... index.html
https://blockly-games.appspot.com/
For the beginning I wouldn't need some very complex Calculations but even easy stuff like "Increase User Variable", "Check for Temperature + x", "Multiply Numbers to convert units" would be very useful

Re: Math Libraries for Blockly
Posted: Saturday 05 March 2016 18:39
by manjh
I second that. Would be great for my "intelligent dimmer", which is controlled by the value of a user variable.
Example:
0 = off
1 = 25%
2 = 50%
3 = 75%
4 = full
A motion sensor would set the variable to 4, and start a timer.
Timer runs out: decrement variable and restart timer.
Variable reaches 0: dimmer to off, and cancel timer.
Re: Math Libraries for Blockly
Posted: Saturday 05 March 2016 18:53
by gizmocuz
Great idea !
Please submit a git pull request with the needed changes
Re: Math Libraries for Blockly
Posted: Sunday 27 March 2016 20:46
by Marci
In progress - will issue pull request once finished.
Re: Math Libraries for Blockly
Posted: Saturday 14 May 2016 0:41
by velkrosmaak
Can't wait for this - going to use it to compare the current energy usage with that from 5 minutes ago, and notify me if something has stopped using energy (such as the dishwasher)

Re: Math Libraries for Blockly
Posted: Tuesday 22 November 2016 20:24
by CherAlban
Hi,
is there any news on this topic? I would also highly appreciate basic math blocks.
CherAlban
Re: Math Libraries for Blockly
Posted: Wednesday 07 December 2016 10:20
by michaldobrotka
+1
Yes please math in Blockly
Re: Math Libraries for Blockly
Posted: Friday 30 June 2017 9:05
by BigOpus
Hello,
some news about this very helpful feature? I need somethig like.
e.g. if "actual temp" - 2 = "set temp" then...
Re: Math Libraries for Blockly
Posted: Thursday 23 November 2017 17:57
by tuxmartin
Hi,
any news about this feature?
Try it:
https://developers.google.com/blockly/
Re: Math Libraries for Blockly
Posted: Saturday 11 July 2020 13:19
by Patricen
Up

Re: Math Libraries for Blockly
Posted: Tuesday 16 March 2021 14:12
by TSkar
Did this suggestion get dropped, or are there any kind of progress on this?
Even basic math like addition and subtraction would help a lot.
Re: Math Libraries for Blockly
Posted: Tuesday 16 March 2021 17:45
by Alain
I don't think there is much development in the Blockly side of things. Math functions would make life a little easier, for sure.
Re: Math Libraries for Blockly
Posted: Saturday 22 January 2022 13:32
by jvm1000
+1
Yes please math in Blockly