Insert new void in Mbloc extension


#1

Hi,

I create an extension for mblock and i need to have another void.
It’s OK for :

Void setup (){} “setup”:"",
Void loop (){} “loop”:"",

but How to have this under the loop :

Datacontroller (void) {

Thanks for your help


#2

Please refer to this instruction


#3

Tanks i have this guide but in arduino mode i need to create à New void look like

Void setup, void delay…

Any exemple.

Sorry


#4

I’d suggest that you create the Datacontroller as a separate set of .CPP/.H files and include the .H file in your main program. See my ActionTimer library for how I did it. (link)


#5

Thanks,
I found :wink:
In mBlock 3.4.11, create New block with name “example” (Data&Blocks menu). The result in the arduino code is void example (){ } is create under void loop (){}
:wink:


#6

Cool, glad to hear you found a solution! :slight_smile:


#7

Thank you so much for this. I was into this issue and tired to tinker around to check if its possible but couldnt get it done. Now that i have seen the way you did it, thanks guys
with
regards
shareit UC browser MX player