Im getting compiling errors all the way, mostly undeclared Variables.
Here is the Node, the Input is hooked up to the GyX output.
<EmbrioCopy>
<Version>1.3.6.0</Version>
<Nodes>
<Node>
<UniqueID>29150abf-85a1-4703-8f1f-f88ce671bb87</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerCustomArduinoNode</AssemblyType>
<NodeType>Custom Arduino Node</NodeType>
<UserDefinedName>Custom Arduino Node</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>201,204,227,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>734</Width>
<IncludeCode></IncludeCode>
<DeclerationCode>float currentAngle = 0; //Keep track of our current angle
float rotationThreshold = 1;
int16_t Input_GyroRate;</DeclerationCode>
<SetupCode></SetupCode>
<ImageName>arduino.png</ImageName>
<InfoURL></InfoURL>
<IsOpen>True</IsOpen>
<EditWidth>360</EditWidth>
<CodeDefinitions>
<CodeDefinition>
<UpdateCondition>EveryUpdate</UpdateCondition>
<Code>if (gyroRate &gt;= rotationThreshold || gyroRate &lt;= -rotationThreshold) {
gyroRate /= 32;
currentAngle += gyroRate;
}
if (currentAngle &lt; 0)
currentAngle += 360;
else if (currentAngle &gt; 359)
currentAngle -= 360;
Output_Result = currentAngle</Code>
<UniqueID>307e9860-33e0-4837-b6ad-f80f9568f71e</UniqueID>
</CodeDefinition>
</CodeDefinitions>
<Inputs>
<Input>
<UniqueID>0468cbea-4c03-4a06-9064-8d0f03a152d9</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation</DefaultName>
<CustomName>GyroRate</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeInput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<ConnectedOutputs></ConnectedOutputs>
<BlendMode>Add</BlendMode>
<DisconnectedValue>0</DisconnectedValue>
<UseNegativeRange>False</UseNegativeRange>
<CanUseNegativeRange>True</CanUseNegativeRange>
</Input>
</Inputs>
<Outputs>
<Output>
<UniqueID>2be0f914-dd7b-486f-9ba2-ed3dae365a06</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Integer</DefaultName>
<CustomName>Result</CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Integer</TypeName>
<IsOutsideConnection>False</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>
</Outputs>
</Node>
</Nodes>
</EmbrioCopy>
Edited by user Thursday, February 18, 2016 5:56:58 AM(UTC)
| Reason: Not specified