Hi,
Custom nodes in Embrio are meant to be very powerful tool for convenient programming and for filling missing functionality of basic Embrio library. I would gladly switch from writing code in Arduino editor to Embrio because of its visualization convenience, but at the moment I can't because of lack of information.
Here is what I am talking about:
1. To understand how to write code for nodes I must understand how it works, how it is imlemented in that model of programming that I am used to in Arduino editor. Some "underhood" explanation would be very useful. For example in Docs in "Editing nodes definition" you explain update conditions under drop-down menu:
Declarations: Here you can write variables and functions that can be used from any code in the node.
Out of this I make an assumption that if I check "touches physical pin" then code written in Declarations is placed in Arduino editor before "Setup" section where I usually do my declarations. So I try to make my own sensor read node:
Declarations:
int _value;
Every update:
_value = analogRead(Input_Pin);
Output_Sensor = transform(_value, Input_In_min, Input_In_max, Input_Out_min, Input_Out_max);
And compiler returns me an error: "_value" was not declared in the scope of "Every update". But wait a minute, docs told me that in "Declarations" I can write variables and functions that can be used
from any code in the node. It brings confusion. My assumption was wrong?
At this point I realize I dont understand how it really works and documentation doesn't give me an answer. What happened with my variable, why it became undeclared?
Encapsulation paragraph in "Custom Arduino Node Notes" gives a glimpse on this telling that nodes don't have global variables, but doesn't explain implementation.
Conclusion: Needed more detailed explanation what happens to code placed in all sections of custom node. Is it converted to something else? Is variable name changed during compiling?
2. Reference.
As Embrio has its own functions and syntax of accessing inputs, outputs, triggers and so on it could be good idea to make a reference list of all of it. Now I have to gather that info through all articles in Docs anf if I forget something I need to look through it all again to recover. Syntax and Functions should be gathered in one place.
These are difficulties I encountered trying to start working with Embrio. Maybe I am not the only one. Hope this feedback will help to make your product better. I really enjoy it but it needs to be explained a bit better to understand it's concepts.
Thank you.