Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
trom24  
#1 Posted : Friday, June 09, 2017 4:21:26 PM(UTC)
trom24

Rank: Member

Groups: Registered
Joined: 6/8/2016(UTC)
Posts: 11

Thanks: 1 times
Was thanked: 7 time(s) in 7 post(s)
Sorry for my speling in English, I speek french.

I have a code that works perfectly on Arduino IDE.
I'm presently using Embrio ver. 2.0.8.0
I get the error : Error uploadind to Arduino:

Here the native code for IDE :

#include <SoftwareSerial.h>
#include <Nextion.h>

SoftwareSerial nextion(2, 3);// Nextion TX to pin 2 and RX to pin 3 of Arduino

Nextion myNextion(nextion, 9600); //create a Nextion object named myNextion using the nextion serial port @ 9600bps

void setup() {
Serial.begin(9600);
myNextion.init();

}

void loop() {
String message = myNextion.listen(); //check for message
if(message != ""){ // if a message is received...
Serial.println(message); //...print it out
}
}

Here is my code in the Custom Node :

<EmbrioCopy>
<Version>2.0.8.0</Version>
<Name></Name>
<UniqueID>00000000-0000-0000-0000-000000000000</UniqueID>
<Description></Description>
<NodeColor>128,128,128,255</NodeColor>
<IsBuiltIn>False</IsBuiltIn>
<ImageByteArray></ImageByteArray>
<Nodes>
<Node>
<UniqueID>1a2d3ab1-f0d4-45f6-b6f5-b1edce520d24</UniqueID>
<NodeType>Dynamic</NodeType>
<NodeName>Node Definition</NodeName>
<UserDefinedName></UserDefinedName>
<Description></Description>
<NodeColor>201,227,222,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>260</Width>
<DefinitionID>bffcc0eb-92ef-4a0e-baa3-1ab183e910c2</DefinitionID>
<EditingProperties>
<IsInEditMode>False</IsInEditMode>
<CodeHeight>558</CodeHeight>
<EditedLanguage>Arduino</EditedLanguage>
<IsEditingIODefinitions>False</IsEditingIODefinitions>
<UpdateCodeDefinitionID>99071790-1c28-436a-ae0b-136a9d4e3200</UpdateCodeDefinitionID>
</EditingProperties>
<SetLength>0</SetLength>
<SetInputs></SetInputs>
<SetOutputs></SetOutputs>
<Inputs></Inputs>
<Outputs>
<Output>
<UniqueID>df901d2c-1e7d-4722-87a4-d9507b93fe00</UniqueID>
<DefinitionID>b6fb6d23-d35a-4837-b9e7-e50897175781</DefinitionID>
<DefaultName>MsgOut</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>String</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.StringNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<MaxLength>10</MaxLength>
</Output>
</Outputs>
</Node>
</Nodes>
<NodeDefinitions>
<Definition>
<Name>Nextion_message</Name>
<SoftwareVersion>2.0.8.0</SoftwareVersion>
<UniqueID>bffcc0eb-92ef-4a0e-baa3-1ab183e910c2</UniqueID>
<Description></Description>
<UseIOSet>False</UseIOSet>
<InputDefinitions></InputDefinitions>
<OutputDefinitions>
<OutputDefinition>
<Type>Embrio.NodeEngine.Definitions.StringNodeOutputDefinition</Type>
<Name>MsgOut</Name>
<UniqueID>b6fb6d23-d35a-4837-b9e7-e50897175781</UniqueID>
<IsOutsideConnection>False</IsOutsideConnection>
<IsInIOSet>False</IsInIOSet>
<IsUserAdded>True</IsUserAdded>
<DefaultMaxLength>10</DefaultMaxLength>
</OutputDefinition>
</OutputDefinitions>
<UpdateCodes>
<UpdateCode>
<UpdateCondition>Declaration</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code>#include &amp;lt;SoftwareSerial.h&amp;gt;
#include &amp;lt;Nextion.h&amp;gt;
SoftwareSerial nextion(2, 3);// Nextion TX to pin 2 and RX to pin 3 of Arduino
Nextion myNextion(nextion, 9600); //create a Nextion object named myNextion using the nextion serial port @ 9600bps</Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>99071790-1c28-436a-ae0b-136a9d4e3200</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>Startup</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code>Serial.begin(9600);
myNextion.init();</Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>12777451-ae3b-43a0-899e-180a1680822a</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>EveryUpdate</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code>String message = myNextion.listen(); //check for message
if(message != &amp;quot;&amp;quot;){ // if a message is received...
Output_MsgOut = message;
}</Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>0727189c-402e-43f6-99a3-60103642a141</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>Shutdown</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code></Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>9a323c65-4671-4c57-8e93-e434c3d9075e</UniqueID>
</UpdateCode>
<UpdateCode>
<UpdateCondition>None</UpdateCondition>
<CodeImplementations>
<Implementation>
<Code></Code>
<Language>CSharp</Language>
</Implementation>
<Implementation>
<Code></Code>
<Language>Arduino</Language>
</Implementation>
</CodeImplementations>
<UniqueID>d43a59cc-3b4f-40d5-bccf-ee6b6a0ecbaa</UniqueID>
</UpdateCode>
</UpdateCodes>
<NodeColor>201,227,222,255</NodeColor>
<IsBuiltIn>False</IsBuiltIn>
<TouchesPin>True</TouchesPin>
<IsLanguageLocked>False</IsLanguageLocked>
<CategoryName>Project</CategoryName>
</Definition>
</NodeDefinitions>
</EmbrioCopy>


thanks 1 user thanked trom24 for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#2 Posted : Saturday, June 10, 2017 7:32:52 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)
Have you added references to SoftwareSerial.h and Nextion.h to the controller? Instructions for references are on the bottom of the Controllers page.

You need to open the controller options page by double clicking on the controller in the project tree, or right click on the node and select "Controller Settings". Then on the form press Load Files and select the files, they will then be copied to the compile folder.
trom24  
#3 Posted : Sunday, June 11, 2017 3:51:31 AM(UTC)
trom24

Rank: Member

Groups: Registered
Joined: 6/8/2016(UTC)
Posts: 11

Thanks: 1 times
Was thanked: 7 time(s) in 7 post(s)
Thank you!

I guess with this new version these files need to be included in the controller properties.

I'll try this.
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