September 13, 2016
Is there a way of calling a subroutine in Edblocks?
I have some sets of repeated code that I want to call throughout my main program and rather than repeating the code multiple times I just want to call the different subroutines.
I was hoping the Send Messages might work as subroutines, (main program sends a message and then use a Start Event with matching colour message as the subroutine) but they don’t as they only communicate between different Edisons.
The other Start Events interrupt the main program, but they don’t allow me to trigger what I need at the right time.
Is there another way I’ve missed?
Also, during my testing I noticed that the “Start when black surface is detected” Start Event triggers as soon as I press play, even when the Edison is sitting on White paper, which doesn’t quite seem right to me.
August 24, 2015
EdBlocks has been designed to be an introductory programming language, subroutines are more of an advanced programming concept.
As such it is not possible to easily create subroutines in EdBlocks
Thanks for the heads up about the “Start when black surface is detected” block, I’ll add it to our list to investigate