Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
kevshouse  
#1 Posted : Friday, December 11, 2015 2:30:35 AM(UTC)
kevshouse

Rank: Newbie

Groups: BetaUser, Registered
Joined: 11/10/2015(UTC)
Posts: 3

Thanks: 1 times
Embrio will crash if I try to time or compile upload the following custom node. Any idea what may be causing this, I guess that it may be something in the included library but I don't have a clue as to what to look for.

Regards,

Kevin

<EmbrioCopy>
<Version>1.2.9.0</Version>
<Nodes>
<Node>
<UniqueID>f9f1b3ea-3104-4fa6-b787-645736c97a1e</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerCustomArduinoNode</AssemblyType>
<NodeType>Custom Arduino Node</NodeType>
<UserDefinedName>TemperatureSensor</UserDefinedName>
<Description>A node that lets you write any Arduino code to interact with the Arduino hardware. Can be both an input and output.</Description>
<NodeColor>144,183,227,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>568</Width>
<IncludeCode>#include &lt;OneWire.h&gt;
#include &lt;DallasTemperature.h&gt;</IncludeCode>
<DeclerationCode>OneWire oneWire(2);
DallasTemperature sensors(&amp;oneWire);
float tVal;
int cVal;</DeclerationCode>
<SetupCode></SetupCode>
<ImageName>arduino.png</ImageName>
<InfoURL></InfoURL>
<CodeDefinitions>
<CodeDefinition>
<TriggerInputID>592500aa-67b4-4207-af40-1547daa46350</TriggerInputID>
<UpdateCondition>Trigger</UpdateCondition>
<Code>sensors.requestTemperatures();
Output_DevCount = sensors.getDeviceCount();
tVal = sensors.getTempCByIndex(0);
cVal = tVal * 100;
Output_t = tVal / 100;
Output_intC = cVal;
Output_Text = tVal;</Code>
<UniqueID>f5451648-b045-488c-a069-3601e8ef0b8b</UniqueID>
</CodeDefinition>
<CodeDefinition>
<TriggerInputID>c3474317-20c4-43ca-be0c-9402b55ce4dd</TriggerInputID>
<UpdateCondition>Trigger</UpdateCondition>
<Code>sensors.begin();
if (sensors.getDeviceCount() == 0)
{
Output_Error = true;
Output_Text = &amp;quot;No Sensors Connected.&amp;quot;;
}
</Code>
<UniqueID>ead295a0-2e71-43c3-90be-c3952487ed6a</UniqueID>
</CodeDefinition>
</CodeDefinitions>
<Inputs>
<Input>
<UniqueID>c3474317-20c4-43ca-be0c-9402b55ce4dd</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Trigger</DefaultName>
<CustomName>Start</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Trigger</TypeName>
<IsOutsideConnection>True</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.TriggerNodeInput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<ConnectedOutputs>
<Output>7217fb85-a213-4184-a9e6-9ee66194062d</Output>
</ConnectedOutputs>
</Input>
<Input>
<UniqueID>592500aa-67b4-4207-af40-1547daa46350</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Trigger 1</DefaultName>
<CustomName>Read</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Trigger</TypeName>
<IsOutsideConnection>True</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.TriggerNodeInput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<ConnectedOutputs>
<Output>7217fb85-a213-4184-a9e6-9ee66194062d</Output>
</ConnectedOutputs>
</Input>
</Inputs>
<Outputs>
<Output>
<UniqueID>755a1dbf-1ef4-4f00-b78f-81682cf889b1</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Integer</DefaultName>
<CustomName>DevCount</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Integer</TypeName>
<IsOutsideConnection>True</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.IntegerNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<MinValue>0</MinValue>
<MaxValue>100</MaxValue>
</Output>
<Output>
<UniqueID>576c19d5-0445-482f-8013-64d5ec9673cb</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation</DefaultName>
<CustomName>t</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>True</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<MinValue>0</MinValue>
<MaxValue>1</MaxValue>
<UseNegativeRange>False</UseNegativeRange>
<CanUseNegativeRange>True</CanUseNegativeRange>
</Output>
<Output>
<UniqueID>5477c9fa-71ed-40a8-912f-00883c3a9094</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Integer 1</DefaultName>
<CustomName>intC</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Integer</TypeName>
<IsOutsideConnection>True</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.IntegerNodeOutput</IOType>
<ShowGraph>True</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<MinValue>0</MinValue>
<MaxValue>1000</MaxValue>
</Output>
<Output>
<UniqueID>dd8c85ec-c663-4b22-bf92-9fa633b989d4</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Text</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>String</TypeName>
<IsOutsideConnection>True</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.StringNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<MaxLength>10</MaxLength>
</Output>
<Output>
<UniqueID>7eddb528-bc0e-4e0b-98a0-339822c64118</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Trigger</DefaultName>
<CustomName>Error</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Trigger</TypeName>
<IsOutsideConnection>True</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.TriggerNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
</Output>
</Outputs>
</Node>
</Nodes>
</EmbrioCopy>
EmbrioAdmin  
#2 Posted : Thursday, December 17, 2015 5:02:58 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Hi,

Sorry I didn't notice this one until today. When you say Embrio crashes, do you mean the program closes, or it logs an error?

There are a few things I'd change on this.

First, change the includes from using <> to "", so they should look like #include "OneWire.h".

I don't think you need the Start trigger, instead put that code in the Setup block.

Finally, your Output_Error is a trigger, you fire a trigger by writing:
trigger(Output_Error);

The way you wrote it seems intuitive, I'll do something to either replace what you wrote with the correct code when Embrio writes the final program, or show you a message.

Let me know if you still have trouble getting it to compile, I haven't tried downloading the libraries you're using yet but will if you can't get it working.
krohneew  
#3 Posted : Friday, December 18, 2015 1:25:55 PM(UTC)
krohneew

Rank: Member

Groups: BetaUser, Registered
Joined: 12/6/2015(UTC)
Posts: 10

I just noticed Emrbio is consistently crashing if I have a declaration of any kind. The following node does absolutely nothing but declare an integer variable called "x" and assign it to zero.

<EmbrioCopy>
<Version>1.2.9.0</Version>
<Nodes>
<Node>
<UniqueID>46d60855-71bd-4970-9126-01f1b483073a</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerCustomArduinoNode</AssemblyType>
<NodeType>Custom Arduino Node</NodeType>
<UserDefinedName></UserDefinedName>
<Description>A node that lets you write any Arduino code to interact with the Arduino hardware. Can be both an input and output.</Description>
<NodeColor>144,183,227,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>260</Width>
<IncludeCode></IncludeCode>
<DeclerationCode>int x = 0;</DeclerationCode>
<SetupCode></SetupCode>
<ImageName>arduino.png</ImageName>
<InfoURL></InfoURL>
<CodeDefinitions></CodeDefinitions>
<Inputs></Inputs>
<Outputs></Outputs>
</Node>
</Nodes>
</EmbrioCopy>

An otherwise empty project crashes almost as soon as I hit the "compile and upload" button or the "run timing code" button. It has no trouble "connecting". This is on Emrbio 1.2.9.0

Edited by user Friday, December 18, 2015 1:30:19 PM(UTC)  | Reason: Not specified

EmbrioAdmin  
#4 Posted : Friday, December 18, 2015 4:41:37 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Could you describe the crash? Does the program just close or does it give you an error?
EmbrioAdmin  
#5 Posted : Friday, December 18, 2015 4:58:50 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Never mind! I'm able to reproduce the crash, had to do with checking for timing data before uploading a new timing program, which I just added. I'll have it fixed with a new installer this weekend. You can get the previous version from the download page for now.

Thanks for posting about this!

Edited by user Friday, December 18, 2015 5:00:17 PM(UTC)  | Reason: Not specified

EmbrioAdmin  
#6 Posted : Sunday, December 20, 2015 11:28:42 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
The new installer fixes this issue. Thanks again for alerting me to it!
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error