Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
jitzevanzwol@gmail.com  
#1 Posted : Wednesday, March 16, 2016 9:28:39 AM(UTC)
jitzevanzwol@gmail.com

Rank: Newbie

Groups: BetaUser, Registered
Joined: 3/2/2016(UTC)
Posts: 5
Netherlands

Was thanked: 2 time(s) in 2 post(s)
Hello,

Who can help me make a Custom Arduino Node in Embrio of a DS18B20 digital temperature measurement? I have a working Arduino sketch with 10x DS18B20 digital temperature measurement. Just started with the includes and translation to Embrio but gives me no response in Embrio.

Next program is a working Arduino sketch:BigGrin

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

DeviceAddress T1 = { 0x28, 0x3A, 0x23, 0x8D, 0x05, 0x00, 0x00, 0xFB };
DeviceAddress T2 = { 0x28, 0x34, 0xA1, 0x8C, 0x05, 0x00, 0x00, 0x2F };
DeviceAddress T3 = { 0x28, 0x76, 0xE3, 0x8C, 0x05, 0x00, 0x00, 0x5E };
DeviceAddress T4 = { 0x28, 0xCD, 0x2E, 0x8E, 0x05, 0x00, 0x00, 0x68 };
DeviceAddress T5 = { 0x28, 0x85, 0x2C, 0x8E, 0x05, 0x00, 0x00, 0x3F };
DeviceAddress T6 = { 0x28, 0x38, 0x0D, 0x8D, 0x05, 0x00, 0x00, 0xCF };
DeviceAddress T7 = { 0x28, 0x60, 0x27, 0x8D, 0x05, 0x00, 0x00, 0x05 };
DeviceAddress T8 = { 0x28, 0x2D, 0x89, 0x8D, 0x05, 0x00, 0x00, 0xAB };
DeviceAddress T9 = { 0x28, 0xF3, 0x1F, 0x8D, 0x05, 0x00, 0x00, 0x57 };
DeviceAddress T10 = { 0x28, 0xA6, 0x2B, 0x8D, 0x05, 0x00, 0x00, 0x09 };

void setup(void)
{
// start serial port
Serial.begin(9600);
// Start up the library
sensors.begin();
// set the resolution to 12 bit (better!)
sensors.setResolution(T1, 12);
sensors.setResolution(T2, 12);
sensors.setResolution(T3, 12);
sensors.setResolution(T4, 12);
sensors.setResolution(T5, 12);
sensors.setResolution(T6, 12);
sensors.setResolution(T7, 12);
sensors.setResolution(T8, 12);
sensors.setResolution(T9, 12);
sensors.setResolution(T10, 12);

}

void printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
Serial.print("Error getting temperature");
} else {
// Serial.print("C: ");
Serial.print(tempC);

}
}

void loop(void)
{
delay(1000);
//Serial.print("Getting temperatures...\n\r");
sensors.requestTemperatures();

Serial.print("{T1,T,");
printTemperature(T1);
Serial.print(" }");
Serial.print("{T2,T,");
printTemperature(T2);
Serial.print(" }");
Serial.print("{T3,T,");
printTemperature(T3);
Serial.print(" }");
Serial.print("{T4,T,");
printTemperature(T4);
Serial.print(" }");
Serial.print("{T5,T,");
printTemperature(T5);
Serial.print(" }");
Serial.print("{T6,T,");
printTemperature(T6);
Serial.print(" }");
Serial.print("{T7,T,");
printTemperature(T7);
Serial.print(" }");
Serial.print("{T8,T,");
printTemperature(T8);
Serial.print(" }");
Serial.print("{T9,T,");
printTemperature(T9);
Serial.print(" }");
Serial.print("{T10,T,");
printTemperature(T10);
Serial.print(" }");

}

Thanks for reading.

Kind regards,

Jitze.
thanks 1 user thanked jitzevanzwol@gmail.com for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#2 Posted : Wednesday, March 16, 2016 9:40:19 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)
Could you copy and paste what you have for your embrio node? I think the problem is that the read temp function has to wait for 10s or hundreds of milliseconds, which really messes up the execution flow of a compiled embrio program. The solution I think would be to rewrite the get temp code and instead of using delay to pause the function would basically be broken into two parts. Part one does everything up until the big delay but instead of calling delay does nothing. Then an internal counter increment counts each embrio update until it is time to process the second part. I know I spent some time trying to get that to work but don't remember if I ever finished it. I'll look into that again.

Another maybe slightly less attractive option is to use 2 arduinos. One to do the long delay temp sensing and another to do the rest. There are examples in the tutorial videos about how to have 2 arduinos communicate.
thanks 1 user thanked EmbrioAdmin for this useful post.
sample@email.tst on 4/7/2024(UTC)
jitzevanzwol@gmail.com  
#3 Posted : Thursday, March 17, 2016 11:18:54 AM(UTC)
jitzevanzwol@gmail.com

Rank: Newbie

Groups: BetaUser, Registered
Joined: 3/2/2016(UTC)
Posts: 5
Netherlands

Was thanked: 2 time(s) in 2 post(s)
Hello Embrio Admin,

Thanks for reading and advise.
Underneath you wil find my Custom Arduino Node for 10 sensors.
I'll think the goal of my project is maybe too high, probably it is wise to make first a working node for 1x DS18B20 temperature sensor.
But anyway.

Best Regards,

Jitze.

<EmbrioCopy>
<Version>1.3.6.0</Version>
<Nodes>
<Node>
<UniqueID>a0097e15-c87f-4b7d-ac28-2cb44696a19d</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerCustomArduinoNode</AssemblyType>
<NodeType>Custom Arduino Node</NodeType>
<UserDefinedName>DS18B20 digital temperature 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>144,183,227,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>1005</Width>
<IncludeCode>#include &lt;OneWire.h&gt;
#include &lt;DallasTemperature.h&gt;</IncludeCode>
<DeclerationCode>// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3</DeclerationCode>
<SetupCode>
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&amp;oneWire);
DeviceAddress T1 = { 0x28, 0x3A, 0x23, 0x8D, 0x05, 0x00, 0x00, 0xFB };
DeviceAddress T2 = { 0x28, 0x34, 0xA1, 0x8C, 0x05, 0x00, 0x00, 0x2F };
DeviceAddress T3 = { 0x28, 0x76, 0xE3, 0x8C, 0x05, 0x00, 0x00, 0x5E };
DeviceAddress T4 = { 0x28, 0xCD, 0x2E, 0x8E, 0x05, 0x00, 0x00, 0x68 };
DeviceAddress T5 = { 0x28, 0x85, 0x2C, 0x8E, 0x05, 0x00, 0x00, 0x3F };
DeviceAddress T6 = { 0x28, 0x38, 0x0D, 0x8D, 0x05, 0x00, 0x00, 0xCF };
DeviceAddress T7 = { 0x28, 0x60, 0x27, 0x8D, 0x05, 0x00, 0x00, 0x05 };
DeviceAddress T8 = { 0x28, 0x2D, 0x89, 0x8D, 0x05, 0x00, 0x00, 0xAB };
DeviceAddress T9 = { 0x28, 0xF3, 0x1F, 0x8D, 0x05, 0x00, 0x00, 0x57 };
DeviceAddress T10 = { 0x28, 0xA6, 0x2B, 0x8D, 0x05, 0x00, 0x00, 0x09 };
</SetupCode>
<ImageName>arduino.png</ImageName>
<InfoURL></InfoURL>
<IsOpen>True</IsOpen>
<EditWidth>360</EditWidth>
<CodeDefinitions>
<CodeDefinition>
<UpdateCondition>EveryUpdate</UpdateCondition>
<Code> sensors.setResolution(T1, 12);
sensors.setResolution(T2, 12);
sensors.setResolution(T3, 12);
sensors.setResolution(T4, 12);
sensors.setResolution(T5, 12);
sensors.setResolution(T6, 12);
sensors.setResolution(T7, 12);
sensors.setResolution(T8, 12);
sensors.setResolution(T9, 12);
sensors.setResolution(T10, 12);
</Code>
<UniqueID>a8514acc-9688-4876-bc6b-48dabc162fab</UniqueID>
</CodeDefinition>
<CodeDefinition>
<UpdateCondition>None</UpdateCondition>
<Code>Serial.print(&amp;quot;{T1,T,&amp;quot;);
Temperature(T1).print(Output_Activation);
Temperature(T2).print(Output_Activation1);
Temperature(T3).print(Output_Activation2);
Temperature(T4).print(Output_Activation3);
Temperature(T5).print(Output_Activation4);
Temperature(T6).print(Output_Activation5);
Temperature(T7).print(Output_Activation6);
Temperature(T8).print(Output_Activation7);
Temperature(T9).print(Output_Activation8);
Temperature(T10).print(Output_Activation9);
</Code>
<UniqueID>39e362e1-5661-49c6-8056-617b6e7a7cd6</UniqueID>
</CodeDefinition>
</CodeDefinitions>
<Inputs></Inputs>
<Outputs>
<Output>
<UniqueID>ccf97814-523b-4df1-bd3d-ae6a1256a861</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>948ec9c3-8bbd-46e4-8e2a-ab018e9596f1</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 1</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>ed4c533e-4be4-4f4b-8c66-54a892f28808</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 2</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>da351770-29ad-466a-b85b-ca2a79a689f2</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 3</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>f5999a8a-8b6a-4c9b-a7f4-29571cb04748</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 4</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>314d977f-813a-4280-baca-d12cad402a96</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 5</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>e5eaba95-4b90-4a60-894b-33dd5e22a4c6</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 6</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>4755837e-9f7d-4441-8079-24392c542f05</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 7</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>b3ada058-cf02-4700-9a9b-f7eb2fd763c1</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 8</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</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>9978167b-f737-4a3b-bff2-8dc6350f06d7</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation 9</DefaultName>
<CustomName></CustomName>
<IsDisplayed>True</IsDisplayed>
<IsNative>False</IsNative>
<TypeName>Numeric</TypeName>
<IsOutsideConnection>False</IsOutsideConnection>
<IOType>Embrio.NodeEngine.NodeIO.NumericNodeOutput</IOType>
<ShowGraph>False</ShowGraph>
<LinkedIOID>00000000-0000-0000-0000-000000000000</LinkedIOID>
<IsUserAdded>True</IsUserAdded>
<MinValue>0</MinValue>
<MaxValue>1</MaxValue>
<UseNegativeRange>False</UseNegativeRange>
<CanUseNegativeRange>True</CanUseNegativeRange>
</Output>
</Outputs>
</Node>
</Nodes>
</EmbrioCopy>
thanks 1 user thanked jitzevanzwol@gmail.com for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#4 Posted : Saturday, March 19, 2016 12:29:55 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)
Yeah probably a good idea to get one working first. I notice a couple things that are probably causing you issues.

First, I think all of the code in the Setup block should be in the Declaration Code block. Those are global variables, if they are declared in the setup block the updates won't be able to see them.

I think the sensors.setResolution() calls should be in the setup section, I don't think those should execute on every update.

Finally the last block should probably be Every Update. I'm not sure how Temperature().print() works, but to set the output values you'll need to do something like "Output_Activation = something".

If you get it working make sure to get node timing. Check the Profiler tab. You'll probably want this node on an agent that updates slowly, like once per second, unless you expect your temperatures to be changing very fast.

Let me know how it goes!
jitzevanzwol@gmail.com  
#5 Posted : Sunday, March 20, 2016 10:06:35 AM(UTC)
jitzevanzwol@gmail.com

Rank: Newbie

Groups: BetaUser, Registered
Joined: 3/2/2016(UTC)
Posts: 5
Netherlands

Was thanked: 2 time(s) in 2 post(s)
Hello Embrio admin,

Thanks for the reply, it brings me closer to the solution.
But still not close enough.

First I change the arduino sketch to 1 x DS18B20 sensor and test the sketch in Arduino.
Then I change my Arduino Node in Embrio with your advice.
(no errors in the Node).

But starting with compiling the program the next errors come up.
19:30:10 ld returned 1 exit status
19:30:10 ld returned 1 exit status
19:30:10 Arduino upload process finished.
19:30:10 Error parsing error line: collect2.exe: error: ld returned 1 exit statusGUID must consist of 32 digits and 4 lines exist (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
19:30:10 "DallasTemperature.cpp" contains unrecognized characters. If this code with an older version of Arduino is created, you can "Tools -> Encryption repair, reloading 'use to update the sketch so it uses UTF-8 encoding. Otherwise you will have to remove the incorrect characters to suppress this warning.

Underneath the Embrio Node of the DS18B20 temperature:

<EmbrioCopy>
<Version>1.3.6.0</Version>
<Nodes>
<Node>
<UniqueID>a0097e15-c87f-4b7d-ac28-2cb44696a19d</UniqueID>
<AssemblyType>Embrio.NodeEngine.AgentController.Nodes.AgentControllerCustomArduinoNode</AssemblyType>
<NodeType>Custom Arduino Node</NodeType>
<UserDefinedName>DS18B20 digital temperature 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>144,183,227,255</NodeColor>
<X>0</X>
<Y>0</Y>
<Width>732</Width>
<IncludeCode>#include &lt;OneWire.h&gt;
#include &lt;DallasTemperature.h&gt;</IncludeCode>
<DeclerationCode>// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&amp;oneWire);
DeviceAddress T1 = { 0x28, 0x3A, 0x23, 0x8D, 0x05, 0x00, 0x00, 0xFB };
</DeclerationCode>
<SetupCode>sensors.setResolution(T1,12);

</SetupCode>
<ImageName>arduino.png</ImageName>
<InfoURL></InfoURL>
<IsOpen>True</IsOpen>
<EditWidth>360</EditWidth>
<CodeDefinitions>
<CodeDefinition>
<UpdateCondition>EveryUpdate</UpdateCondition>
<Code>Output_Activation = sensors.setResolution(T1,12);</Code>
<UniqueID>3e9255de-5ef8-4a20-a18b-0b4db46c6983</UniqueID>
</CodeDefinition>
</CodeDefinitions>
<Inputs></Inputs>
<Outputs>
<Output>
<UniqueID>097ced80-5ca4-4b26-be25-376346853ea2</UniqueID>
<DefinitionID>00000000-0000-0000-0000-000000000000</DefinitionID>
<DefaultName>Activation</DefaultName>
<CustomName></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>
</Outputs>
</Node>
</Nodes>
</EmbrioCopy>


Thanks for reading, Best Regards,

Jitze.
EmbrioAdmin  
#6 Posted : Sunday, March 20, 2016 1:58:39 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)
I don't have the hardware so I haven't tested this, but I put this custom node together from your originally posted example. This assumes a max temperature of 100 degrees before transforming to an Activation, you can change that if you need to.


jitzevanzwol@gmail.com  
#7 Posted : Monday, March 21, 2016 10:38:01 AM(UTC)
jitzevanzwol@gmail.com

Rank: Newbie

Groups: BetaUser, Registered
Joined: 3/2/2016(UTC)
Posts: 5
Netherlands

Was thanked: 2 time(s) in 2 post(s)
Hello Embrio Admin,

No success till now.
It seems difficult way to get the custom arduino node in Embrio working.
I minimize the arduino sketch for better understanding( and still it works for arduino).
I dont see any other possibilities to get them working in Embrio.
Thanks for reading, best Regards,
Jitze

Underneath the sketch for arduino:

#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 3
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress T1 = { 0x28, 0x3A, 0x23, 0x8D, 0x05, 0x00, 0x00, 0xFB };
void setup(void)
{
Serial.begin(9600);
sensors.begin();
sensors.setResolution(T1, 12);
}

void printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
Serial.print("Error getting temperature");
} else {
Serial.print(tempC);
}
}
void loop(void)
{
delay(100);
sensors.requestTemperatures();
Serial.println("T1 temperature : ");
printTemperature(T1);
Serial.println(" C");
Serial.println("\n\r");
}
EmbrioAdmin  
#8 Posted : Monday, March 21, 2016 10:41:55 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)
Just to make sure, did you expand the "spoiler" tag in my last reply and paste that into Embrio? If you did and it still didn't work I'll give it another try with your last minimized example tonight.
jitzevanzwol@gmail.com  
#9 Posted : Monday, March 21, 2016 11:15:54 AM(UTC)
jitzevanzwol@gmail.com

Rank: Newbie

Groups: BetaUser, Registered
Joined: 3/2/2016(UTC)
Posts: 5
Netherlands

Was thanked: 2 time(s) in 2 post(s)
Hello Embrio Admin,

I tried every possible solution.
Still with the same results:

21:09:13 Error compiling timing program.
ld returned 1 exit status
21:09:13 Arduino upload process finished.
21:09:13 Error parsing error line: collect2.exe: error: ld returned 1 exit status

Best Regards,

Jitze
EmbrioAdmin  
#10 Posted : Monday, March 21, 2016 11:18:11 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)
What kind of Arduino are you using?
EmbrioAdmin  
#11 Posted : Monday, March 21, 2016 11:41:00 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)
I'm not sure what to make of the error message you are getting. Can you zip your project and send it to ezra@embrio.io?
scott@scottelford.biz  
#12 Posted : Tuesday, June 06, 2017 2:45:13 PM(UTC)
scott@scottelford.biz

Rank: Advanced Member

Groups: Registered
Joined: 5/31/2017(UTC)
Posts: 67
Australia

Thanks: 1 times
Was thanked: 8 time(s) in 8 post(s)
I guess I have just found an answer to one of my questions before I asked it. This is something I was planning on adding to my project at a later date to monitor the temp in the enclosure, then add a output to drive a fan possible via a mosfet. I think part of this project will require me to read some html structure.
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