LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino and Dallas DS1820 (one-wire)

Solved!
Go to solution

Jogibear,

So it depends on where you have your include for DallasTemperature.h.  To Nathan's point earlier just make sure you're not declaring it in both LIFA_Base and LabVIEWInterface.

----------------------------------LIFA_BASE COPY & PASTE-------------------------

/*********************************************************************************

**

**  LVFA_Firmware - Provides Basic Arduino Sketch For Interfacing With LabVIEW.

**

**  Written By:    Sam Kristoff - National Instruments

**  Written On:    November 2010

**  Last Updated:  Dec 2011 - Kevin Fort - National Instruments

**

**  This File May Be Modified And Re-Distributed Freely. Original File Content

**  Written By Sam Kristoff And Available At www.ni.com/arduino.

**

*********************************************************************************/

/*********************************************************************************

**

** Includes.

**

********************************************************************************/

// Standard includes.  These should always be included.

#include <Wire.h>

#include <SPI.h>

#include <Servo.h>

#include "LabVIEWInterface.h"

#include <OneWire.h>                //For use with OneWire devices

#include <DallasTemperature.h>      //For use with Maxim/Dallas DS18B20 or similiar Temperature devices

//Defines for OneWire and Dallas Temperature

#define ONE_WIRE_BUS 2

//Setup a oneWire instance to communicate with any OneWire devices

OneWire oneWire(ONE_WIRE_BUS);

//Pass our oneWire reference to Dalls Temperature

DallasTemperature sensors(&oneWire);

/*********************************************************************************

**  setup()

**

**  Initialize the Arduino and setup serial communication.

**

**  Input:  None

**  Output: None

*********************************************************************************/

void setup()

  // Initialize Serial Port With The Default Baud Rate

  syncLV();

  // Place your custom setup code here

  sensors.begin();

  sensors.setResolution(9);

 

}

0 Kudos
Message 91 of 172
(5,583 Views)

Ok, I think I have got it, in my mind, but not practically.

The libraries like "#include <DallasTemperature.h>" or "#include <OneWire.h>" must not be included twice, in LIFA_Base.ino and LabVIEWInterface.ino like Nathan said. So when I include "#include "LabVIEWInterface.h"" the other included libraries from this file get automatically included too, right?

I copied and pasted your code but the error is still the same....mhhh.

0 Kudos
Message 92 of 172
(5,583 Views)

If you simply took his code for LIFA_Base.ino then you still have it duplicated in LabVIEWInterface.ino.  I would remove the stuff from LabVIEWInterface.ino (the stuff at the top for the sensor).

0 Kudos
Message 93 of 172
(5,583 Views)

Sorry but I don't get it. It looks this way now, see attachement too. Just copied the first lines which are relevant.......

-----------------LIFA_Base.ino-------------------------------------------------------------------------------------------------------------------------------------------------------------------

// Standard includes.  These should always be included.

#include <Wire.h>

#include <SPI.h>

#include <Servo.h>

#include "LabVIEWInterface.h"

#include <OneWire.h>                //For use with OneWire devices

#include <DallasTemperature.h>      //For use with Maxim/Dallas DS18B20 or similiar Temperature devices

-----------------LabVIEWInterface.ino----------------------------------------------------------------------------------------------------------------------------------------------------------

#include <LiquidCrystal.h>

//Defines for OneWire and Dallas Temperature

#define ONE_WIRE_BUS 2

//Setup a oneWire instance to communicate with any OneWire devices

OneWire oneWire(ONE_WIRE_BUS);

//Pass our oneWire reference to Dallis Temperature

DallasTemperature sensors(&oneWire);

//Includes for IR Remote

#ifndef IRremoteInt_h

#include "IRremoteInt.h"

#endif

#ifndef IRremote_h

#include "IRremote.h"

#endif

Download All
0 Kudos
Message 94 of 172
(5,583 Views)

It looks like you did half-and-half of what has been said.  You need to leave all the temperature sensor stuff that PentairDave posted and then remove that same stuff from LabVIEWInterface.ino.

So, the only reference to the sensor in LabVIEWInterface.ino should be in the main command structure (no declarations or includes for the temperature sensor should be in LabVIEWInterface.ino).  This is how i believe it should work.

Dave can correct me if I've been mistaken.  (I'm not on the right computer to do the code)

0 Kudos
Message 95 of 172
(5,583 Views)

I think I am shortly before the finish.....

Error code while taking this into account: http://forum.arduino.cc/index.php?topic=13679.0

LIFA_Base:41: error: 'DallasTemperature' does not name a type

LIFA_Base.ino: In function 'void setup()':

LIFA_Base:57: error: 'sensors' was not declared in this scope

-------------------------------------------------------------------------------------------------------------------------------------

And when I import the DallasTemperature library into Arduino folder like it is supposed to be!?.... and verify again, I get this:

Wire\OneWire.cpp.o: In function `OneWire::depower()':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:287: multiple definition of `OneWire::depower()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:287: first defined here

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

Wire\OneWire.cpp.o: In function `OneWire::reset_search()':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:300: multiple definition of `OneWire::reset_search()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:300: first defined here

Wire\OneWire.cpp.o: In function `OneWire::target_search(unsigned char)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:315: multiple definition of `OneWire::target_search(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:315: first defined here

Wire\OneWire.cpp.o: In function `OneWire::crc8(unsigned char const*, unsigned char)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:495: multiple definition of `OneWire::crc8(unsigned char const*, unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:495: first defined here

Wire\OneWire.cpp.o: In function `OneWire::crc16(unsigned char const*, unsigned int, unsigned int)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:533: multiple definition of `OneWire::crc16(unsigned char const*, unsigned int, unsigned int)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:533: first defined here

Wire\OneWire.cpp.o: In function `OneWire::check_crc16(unsigned char const*, unsigned int, unsigned char const*, unsigned int)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:527: multiple definition of `OneWire::check_crc16(unsigned char const*, unsigned int, unsigned char const*, unsigned int)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:527: first defined here

Wire\OneWire.cpp.o: In function `OneWire::read_bit()':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:199: multiple definition of `OneWire::read_bit()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:199: first defined here

Wire\OneWire.cpp.o: In function `OneWire::read()':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:252: multiple definition of `OneWire::read()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:252: first defined here

Wire\OneWire.cpp.o: In function `OneWire::read_bytes(unsigned char*, unsigned int)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:262: multiple definition of `OneWire::read_bytes(unsigned char*, unsigned int)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:262: first defined here

Wire\OneWire.cpp.o: In function `OneWire::write_bit(unsigned char)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:171: multiple definition of `OneWire::write_bit(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:171: first defined here

Wire\OneWire.cpp.o: In function `OneWire::write(unsigned char, unsigned char)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:224: multiple definition of `OneWire::write(unsigned char, unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:224: first defined here

Wire\OneWire.cpp.o: In function `OneWire::skip()':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:284: multiple definition of `OneWire::skip()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:284: first defined here

Wire\OneWire.cpp.o: In function `OneWire::select(unsigned char const*)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:270: multiple definition of `OneWire::select(unsigned char const*)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:270: first defined here

Wire\OneWire.cpp.o: In function `OneWire::write_bytes(unsigned char const*, unsigned int, bool)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:238: multiple definition of `OneWire::write_bytes(unsigned char const*, unsigned int, bool)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:238: first defined here

Wire\OneWire.cpp.o: In function `OneWire::reset()':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:137: multiple definition of `OneWire::reset()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:137: first defined here

Wire\OneWire.cpp.o: In function `OneWire::search(unsigned char*)':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:342: multiple definition of `OneWire::search(unsigned char*)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:342: first defined here

Wire\OneWire.cpp.o: In function `OneWire':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:120: first defined here

Wire\OneWire.cpp.o: In function `OneWire':

C:\Program Files (x86)\Arduino\libraries\Wire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:120: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::depower()':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:287: multiple definition of `OneWire::depower()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:287: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::reset_search()':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:300: multiple definition of `OneWire::reset_search()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:300: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::target_search(unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:315: multiple definition of `OneWire::target_search(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:315: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::crc8(unsigned char const*, unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:495: multiple definition of `OneWire::crc8(unsigned char const*, unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:495: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::crc16(unsigned char const*, unsigned int, unsigned int)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:533: multiple definition of `OneWire::crc16(unsigned char const*, unsigned int, unsigned int)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:533: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::check_crc16(unsigned char const*, unsigned int, unsigned char const*, unsigned int)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:527: multiple definition of `OneWire::check_crc16(unsigned char const*, unsigned int, unsigned char const*, unsigned int)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:527: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::read_bit()':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:199: multiple definition of `OneWire::read_bit()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:199: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::read()':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:252: multiple definition of `OneWire::read()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:252: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::read_bytes(unsigned char*, unsigned int)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:262: multiple definition of `OneWire::read_bytes(unsigned char*, unsigned int)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:262: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::write_bit(unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:171: multiple definition of `OneWire::write_bit(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:171: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::write(unsigned char, unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:224: multiple definition of `OneWire::write(unsigned char, unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:224: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::skip()':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:284: multiple definition of `OneWire::skip()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:284: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::select(unsigned char const*)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:270: multiple definition of `OneWire::select(unsigned char const*)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:270: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::write_bytes(unsigned char const*, unsigned int, bool)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:238: multiple definition of `OneWire::write_bytes(unsigned char const*, unsigned int, bool)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:238: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::reset()':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:137: multiple definition of `OneWire::reset()'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:137: first defined here

OneWire\OneWire.cpp.o: In function `OneWire::search(unsigned char*)':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:342: multiple definition of `OneWire::search(unsigned char*)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:342: first defined here

OneWire\OneWire.cpp.o: In function `OneWire':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:120: first defined here

OneWire\OneWire.cpp.o: In function `OneWire':

C:\Users\Johannes\Documents\Arduino\libraries\OneWire/OneWire.cpp:120: multiple definition of `OneWire::OneWire(unsigned char)'

OneWire.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/OneWire.cpp:120: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:20: multiple definition of `DallasTemperature::DallasTemperature(OneWire*)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:20: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:20: multiple definition of `DallasTemperature::DallasTemperature(OneWire*)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:20: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getDeviceCount()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:62: multiple definition of `DallasTemperature::getDeviceCount()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:62: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getResolution()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:251: multiple definition of `DallasTemperature::getResolution()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:250: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::setWaitForConversion(bool)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:290: multiple definition of `DallasTemperature::setWaitForConversion(bool)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:288: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getWaitForConversion()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:297: multiple definition of `DallasTemperature::getWaitForConversion()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:295: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::setCheckForConversion(bool)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:305: multiple definition of `DallasTemperature::setCheckForConversion(bool)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:303: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getCheckForConversion()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:312: multiple definition of `DallasTemperature::getCheckForConversion()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:310: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::isParasitePowerMode()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:477: multiple definition of `DallasTemperature::isParasitePowerMode()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:483: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::resetAlarmSearch()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:557: multiple definition of `DallasTemperature::resetAlarmSearch()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:563: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::toFahrenheit(float)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:699: multiple definition of `DallasTemperature::toFahrenheit(float)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:705: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::toCelsius(float)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:705: multiple definition of `DallasTemperature::toCelsius(float)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:711: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::alarmSearch(unsigned char*)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:577: multiple definition of `DallasTemperature::alarmSearch(unsigned char*)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:583: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::hasAlarm()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:665: multiple definition of `DallasTemperature::hasAlarm()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:671: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::requestTemperatures()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:324: multiple definition of `DallasTemperature::requestTemperatures()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:322: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::processAlarms()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:673: multiple definition of `DallasTemperature::processAlarms()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:679: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getAddress(unsigned char*, unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:72: multiple definition of `DallasTemperature::getAddress(unsigned char*, unsigned char)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:72: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getTempFByIndex(unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:404: multiple definition of `DallasTemperature::getTempFByIndex(unsigned char)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:406: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::getTempCByIndex(unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:395: multiple definition of `DallasTemperature::getTempCByIndex(unsigned char)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:398: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::requestTemperaturesByIndex(unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:387: multiple definition of `DallasTemperature::requestTemperaturesByIndex(unsigned char)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:390: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::setResolution(unsigned char)':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:203: multiple definition of `DallasTemperature::setResolution(unsigned char)'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:202: first defined here

DallasTemperature\DallasTemperature.cpp.o: In function `DallasTemperature::begin()':

C:\Users\Johannes\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.cpp:34: multiple definition of `DallasTemperature::begin()'

DallasTemperature.cpp.o:C:\Users\Johannes\AppData\Local\Temp\build7527387400309307758.tmp/DallasTemperature.cpp:34: first defined here

What is going wrong here.....I start beeing embarrassed by these problems. Thank you again for your patience and your support.

0 Kudos
Message 96 of 172
(5,583 Views)

Jogi,

Nathan is correct in that it does sound like you were declaring half and half.  The LabVIEWInterface file should not have any declarations for OneWire or DallasTemperature in it.  Sounds like you may have fixed this.

As far as the most recent post.  Is there a way you can post your actual code? 

Finally, when you say "And when I import the DallasTemperature library into Arduino folder like it is supposed to be!?.... and verify again, I get this:"  Where did you place the folders?  There should be at least 2 folders under Arduino\libraries\ for this program and those are DallasTempControl and OneWire.  They are separate libraries that actually work together.  In looking at the errors you give above, it looks like DallasTemperature.cpp may have gotten accidentally renamed to DallasTemperatur e.cpp (notice the space)?  Check to make sure this isn't just a debug mishap. And I notice up at the top that it looks like the OneWire library may have been placed in the \Wire directory.  On my computer at least, the OneWire library is in a folder all by itself in the libraries folder with 3 files and an examples folder in it (keywords.txt, OneWire.cpp & OneWire.h).

Hope this helps some and if not, as I said please try to post some code and I'll do what I can to help debug it.

0 Kudos
Message 97 of 172
(5,583 Views)

Thank you PentairDave, yes you were right, there were two OneWire copies in the wrong directory, but the library also contain the right files. Anyway I removed the files but the error code still looks in some way like the old one. A picture says more than thousand words so I made one which shows what my library directory contains.

And I have zipped everthing from "C:\Program Files\National Instruments\LabVIEW 2012\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base" and

"C:\Users\Johannes\Documents\Arduino\libraries", see attachment.

ard.jpg


Download All
0 Kudos
Message 98 of 172
(5,583 Views)

I've never had to add libraries to the Arduino but I'm assuming that you still have it duplicated because you have both include files in both the Arduino libraries and in the LIFA_Base folder.  I'm not really all that sure it will fix it but you can try (remove one of the two).

0 Kudos
Message 99 of 172
(5,583 Views)

Jogi,

So I've been able to replicate and fix the error on my computer now hopefully you can do the same.

First, delete the following files from the LIFA_Base folder:  OneWire.cpp, OneWire.h, DallasTemperature.cpp & DallasTemperature.h

You can try verifying again but the other thing that is different on my machine is that my libraries are located under "C:\Program Files (x86)\Arduino\libraries" and not under "C:\Users\Johannes\Documents\Arduino\libraries".

If doing the first part doesn't fix it, then move the libraries and you should be good to go.  Hope this works.

0 Kudos
Message 100 of 172
(5,583 Views)