Calling a subroutine | EdBlocks programming | Forum

Please consider registering

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

Calling a subroutine
August 4, 2017
2:05 pm
Forum Posts: 4
Member Since:
September 13, 2016
sp_UserOfflineSmall Offline

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 7, 2017
9:29 am
Forum Posts: 180
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi Richard

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 

  • Keep up with Edison

    Sign up for our newsletter to get all things Edison delivered straight to your inbox.

  • This field is for validation purposes and should be left unchanged.

Heads up

The Australian Federal Parliament has passed a law that extends goods and services tax (GST) to low value imports of physical goods imported by consumers from 1 July 2018.

This means that all customers purchasing Edison robots and accessories with an Australian shipping address must now pay GST. The GST will be automatically added to your purchase and show as a line item on your invoice.

We've detected that you are in Australia, so we wanted to let you know that we have changed your settings to view our Australian site, which displays GST inclusive pricing.

You can change back to the GLOBAL SITE at any time using the link in the top left of the page.

OK got it!    Take me to the GLOBAL SITE instead


Pin It on Pinterest

Share This