Compilation Error for Arduino Pro or Pro Mini



  • Hello everyone

    My problem is the following, with imported My Sensors libraries by simply performing the program check, I get the following error message:

    Exit status 1
    Compilation Error for Arduino Pro or Pro Mini

    I started and it's been several days since I was looking for the solution, if a person could advise me.

    cordially

    Daniel


  • Mod

    @Daniel-Ruiz welcome to the MySensors community.

    There should be more information in the output. Is this everything you are getting?



  • Good evening,

    Below you will find the details of the error message.
    I think I do not have to integrate the external library correctly.
    My problem occurs just with external libraries.

    cordially,

    Daniel

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Daniel\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Daniel\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Daniel\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -ide-version=10803 -build-path C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631 -warnings=none -build-cache C:\Users\Daniel\AppData\Local\Temp\arduino_cache_357691 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Daniel\Documents\Arduino\sketch_jul30a\sketch_jul30a.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Daniel\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Daniel\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Daniel\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -ide-version=10803 -build-path C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631 -warnings=none -build-cache C:\Users\Daniel\AppData\Local\Temp\arduino_cache_357691 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Daniel\Documents\Arduino\sketch_jul30a\sketch_jul30a.ino
    Using board 'pro' from platform in folder: C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19
    Using core 'arduino' from platform in folder: C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19
    Detecting libraries used...
    "C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\eightanaloginputs" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631\sketch\sketch_jul30a.ino.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\eightanaloginputs" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SPI\src" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631\sketch\sketch_jul30a.ino.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\eightanaloginputs" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631\sketch\sketch_jul30a.ino.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\eightanaloginputs" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\DallasTemperature" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631\sketch\sketch_jul30a.ino.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\eightanaloginputs" "-IC:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\DallasTemperature" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631\sketch\sketch_jul30a.ino.cpp" -o "C:\Users\Daniel\AppData\Local\Temp\arduino_build_524631\preproc\ctags_target_for_gcc_minus_e.cpp"
    In file included from C:\Users\Daniel\Documents\Arduino\sketch_jul30a\sketch_jul30a.ino:37:0:

    C:\Users\Daniel\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:22:21: fatal error: OneWire.h: No such file or directory

    #include <OneWire.h>

                     ^
    

    compilation terminated.

    Utilisation de la bibliothèque SPI version 1.0 dans le dossier: C:\Users\Daniel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SPI
    Utilisation de la bibliothèque MySensors version 2.0.0 dans le dossier: C:\Users\Daniel\Documents\Arduino\libraries\MySensors
    Utilisation de la bibliothèque DallasTemperature prise dans le dossier : C:\Users\Daniel\Documents\Arduino\libraries\DallasTemperature (legacy)
    exit status 1
    Erreur de compilation pour la carte Arduino Pro or Pro Mini


  • Mod

    @Daniel-Ruiz which sketch are you trying to compile?



  • As I started, I wanted to start simple with two temperature probes.
    Dallas Temperature Sensor



  • Have you installed the onewire library?


  • Mod

    @Daniel-Ruiz Do you mean this one? https://www.mysensors.org/build/temp#example
    If that's the case you seem to have missed the step mentioned just above the code:

    This example uses a modified version of the external DTH library

    Follow the link to install it and you should be good to go.



  • Hello and thank you for your help.
    I installed onewire library
    I used the link: http://www.mysensors.org/build/temp#example

    I no longer have the compile error message for the ARDUINO PRO MINI card
    I now have as a message:
    Exit status 1
    'Class DallasTemperature' has no member named 'millisToWaitForConversion'

    I was about to give up, still a little patience

    Good night

    Daniel



  • Hi Daniel

    See @mfalkvidd 's post above - have you installed the custom DallasTemparature.h library as well? I had the same problem before and the reason was that I hadn't used this library...



  • Hello everyone,

    The DALLAS TEMPARATURE .H library is well installed. I still have an error message:

    0_1501661250410_2017-08-02_10h00_57.png



  • @Daniel-Ruiz
    You may insert two things to get around this in your sketch:
    Insert a line

    int resolution = 12;
    

    in the first part of the sketch and

    conversionTime = 750 / (1 << (12 - resolution));
    

    in before() or setup() section.

    These are the relevant lines that went private for some time in the dallasTemperature-lib.



  • Thank you for your help.
    I do not understand very well with the translation in French. Could you explain to me in more detail or I have to add the two lines.
    DANIEL



  • @Daniel-Ruiz
    Based on the original sketch:

    ...
    int numSensors=0;
    bool receivedConfig = false;
    bool metric = true;
    // Initialize temperature message
    MyMessage msg(0,V_TEMP);
    int resolution = 12;  //<---added
    
    void before()
    {
      // Startup up the OneWire library
      sensors.begin();
      conversionTime = 750 / (1 << (12 - resolution)); //<---added
    }
    ...
    


  • @Daniel-Ruiz Can we see your whole sketch?



  • [code]
    /**

    • The MySensors Arduino library handles the wireless radio link and protocol
    • between your home built sensors/actuators and HA controller of choice.
    • The sensors forms a self healing radio network with optional repeaters. Each
    • repeater and gateway builds a routing tables in EEPROM which keeps track of the
    • network topology allowing messages to be routed to nodes.
    • Created by Henrik Ekblad henrik.ekblad@mysensors.org
    • Copyright (C) 2013-2015 Sensnology AB
    • Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
    • Documentation: http://www.mysensors.org
    • Support Forum: http://forum.mysensors.org
    • This program is free software; you can redistribute it and/or
    • modify it under the terms of the GNU General Public License
    • version 2 as published by the Free Software Foundation.

    // Enable debug prints to serial monitor
    //#define MY_DEBUG

    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69

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

    #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No

    #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected
    #define MAX_ATTACHED_DS18B20 16
    unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
    OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
    DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature.
    float lastTemperature[MAX_ATTACHED_DS18B20];
    int numSensors=0;
    bool receivedConfig = false;
    bool metric = true;
    // Initialize temperature message
    MyMessage msg(0,V_TEMP);
    int resolution = 12; //<---added

    void before()
    {
    // Startup up the OneWire library
    sensors.begin();
    conversionTime = 750 / (1 << (12 - resolution)); //<---added
    }

    void setup()
    {
    // requestTemperatures() will not block current thread
    sensors.setWaitForConversion(false);
    }

    void presentation() {
    // Send the sketch version information to the gateway and Controller
    sendSketchInfo("Temperature Sensor", "1.1");

    // Fetch the number of attached temperature sensors
    numSensors = sensors.getDeviceCount();

    // Present all sensors to controller
    for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
    present(i, S_TEMP);
    }
    }

    void loop()
    {
    // Fetch temperatures from Dallas sensors
    sensors.requestTemperatures();

    // query conversion time and sleep until conversion completed
    int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
    // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
    sleep(conversionTime);

    // Read temperatures and send them to controller
    for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {

    // Fetch and round temperature to one decimal
    float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
    
    // Only send data if temperature has changed and no error
    #if COMPARE_TEMP == 1
    if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
    #else
    if (temperature != -127.00 && temperature != 85.00) {
    #endif
    
      // Send in the new temperature
      send(msg.setSensor(i).set(temperature,1));
      // Save new temperatures for next compare
      lastTemperature[i]=temperature;
    }
    

    }
    sleep(SLEEP_TIME);
    }
    [/code]



  • @Daniel-Ruiz OK. Just to be sure:
    This sketch now is compiling and working as expected?



  • C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Daniel\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -ide-version=10802 -build-path C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187 -warnings=none -build-cache C:\Users\Daniel\AppData\Local\Temp\arduino_cache_4544 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Daniel\Documents\Arduino\sketch_aug01a\sketch_aug01a.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Daniel\Documents\Arduino\libraries -fqbn=arduino:avr:pro:cpu=16MHzatmega328 -ide-version=10802 -build-path C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187 -warnings=none -build-cache C:\Users\Daniel\AppData\Local\Temp\arduino_cache_4544 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Daniel\Documents\Arduino\sketch_aug01a\sketch_aug01a.ino
    Using board 'pro' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Detecting libraries used...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "-IC:\Users\Daniel\Documents\Arduino\libraries\OneWire-master" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "-IC:\Users\Daniel\Documents\Arduino\libraries\OneWire-master" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\SPI.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "-IC:\Users\Daniel\Documents\Arduino\libraries\OneWire-master" "C:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp\DallasTemperature.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "-IC:\Users\Daniel\Documents\Arduino\libraries\OneWire-master" "C:\Users\Daniel\Documents\Arduino\libraries\OneWire-master\OneWire.cpp" -o "nul"
    Generating function prototypes...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "-IC:\Users\Daniel\Documents\Arduino\libraries\OneWire-master" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\preproc\ctags_target_for_gcc_minus_e.cpp"
    "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\preproc\ctags_target_for_gcc_minus_e.cpp"
    Compilation du croquis...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Daniel\Documents\Arduino\libraries\MySensors" "-IC:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp" "-IC:\Users\Daniel\Documents\Arduino\libraries\OneWire-master" "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp" -o "C:\Users\Daniel\AppData\Local\Temp\arduino_build_29187\sketch\sketch_aug01a.ino.cpp.o"
    C:\Users\Daniel\Documents\Arduino\sketch_aug01a\sketch_aug01a.ino: In function 'void before()':

    sketch_aug01a:59: error: 'conversionTime' was not declared in this scope

    conversionTime = 750 / (1 << (12 - resolution)); //<---added

    ^

    C:\Users\Daniel\Documents\Arduino\sketch_aug01a\sketch_aug01a.ino: In function 'void loop()':

    sketch_aug01a:87: error: 'class DallasTemperature' has no member named 'millisToWaitForConversion'

    int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());

    Utilisation de la bibliothèque SPI version 1.0 dans le dossier: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
    Utilisation de la bibliothèque MySensors version 2.1.1 dans le dossier: C:\Users\Daniel\Documents\Arduino\libraries\MySensors
    Utilisation de la bibliothèque MAX31850_DallasTemp version 1.0.0 dans le dossier: C:\Users\Daniel\Documents\Arduino\libraries\MAX31850_DallasTemp
    Utilisation de la bibliothèque OneWire-master version 2.3.3 dans le dossier: C:\Users\Daniel\Documents\Arduino\libraries\OneWire-master
    exit status 1
    'conversionTime' was not declared in this scope



  • @Daniel-Ruiz Thx.
    You may start the line with

    const int conversionTime = 750 / (1 << (12 - resolution));
    

    Sorry for letting that out...



  • @rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:

    This sketch now is compiling and working as expected?

    Sorry to bore you again.
    I have to add the two lines as you indicated.
    I now have a new errone message.
    Daniel



  • @Daniel-Ruiz Already noticed that.
    Fix above should work (newest version, had first vo check for the correct type of data type).



  • @rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:

    Fix above should work (newest version, had first vo check for the correct type of data type).

    I have just done your last modification I have a new error message0_1501769497783_2017-08-03_16h11_10.png



  • just comment this line out (start with //int16_t). This calculation is replaced by the one in the before() section.



  • @rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:

    just comment this line out (start with //int16_t). This calculation is replaced by the one in the before() section

    I also put // before the line sleep (conversatuionTime);
    Which gave an error message.
    And now lr sketch no longer has any error.
    I thank you for help, and I will try to advance now in the discovery of MY SENSORS.

    Daniel



  • @Daniel-Ruiz
    Sorry, but to make the picture complete:
    the sleep() is necessary!
    Please do as follows:
    insert

    const int conversionTime;
    

    in the line below int resolution...

    revert back in before to conversionTime = 750 / (1 << (12 - resolution)); //<---added
    reactivate the sleep(conversionTime) in loop() (or use wait(conversionTime) instead.



  • @rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:

    const int conversionTime;

    J'ai modifié comme ci dessous:
    il n'y plus d'érreur0_1501771521501_2017-08-03_16h44_00.png



  • @Daniel-Ruiz je parle aussi un peu de francais, mais comme ce n'est pas gentile aux autres, je continue en anglais:
    This is not a a good idea to "solve" the problem like this.

    What is necessary is a global variable. This has to be introduced in the header of the c file (before the before() part). But as in the header no calculation is allowed, we have to do this calculation somwhere else (proposal was in the before() section. It is sufficient, to do this once, but it would also be possible to do that in loop(). If you do not want to calculate at all, you may just delete everything with "conversionTime" and do a sleep() with 750ms like that: sleep(750); this is absolutely necessary to get proper results from the DS18x20!
    Further remark: If you want to go further steps with MySensors, you should try to understand the meanings of global variables, data-types, initialisation-functions like before(), presentation() and setup() and the loop().



  • I modified as follows:
    There is no more errors

    I thought that setting up MYSENSORS was something simple, as indicated in the presentation of the website. I thought the skits were working without changing them. I note that this is not the case, and that it is necessary to have notions of programming.



  • @Daniel-Ruiz According to my experience, it normally is not necessary to change sketches.
    Especially not as long as they are "official" MySensors Sketches. But as soon as additional libs are concerned (here: dallasTemperature), the developers may not be able to survey all external changes that may happen. (The conversionTime calculation had been "public" in the past; this had been changed for whatever reason by the dallas-lib-guys). So this sketch originally had worked. It also may have worked, if you installed an older version of the relevant lib (with the lib manager in the IDE).

    Nevertheless: You most likely already got a first idea how these things work. Me too, I had to fullfill a fast learning curve... BUT: It is fun!



  • @rejoe2 said in Compilation Error for Arduino Pro or Pro Mini:

    @Daniel-Ruiz According to my experience, it normally is not necessary to change sketches.
    Especially not as long as they are "official" MySensors Sketches. But as soon as additional libs are concerned (here: dallasTemperature), the developers may not be able to survey all external changes that may happen. (The conversionTime calculation had been "public" in the past; this had been changed for whatever reason by the dallas-lib-guys). So this sketch originally had worked. It also may have worked, if you installed an older version of the relevant lib (with the lib manager in the IDE).
    Nevertheless: You most likely already got a first idea how these things work. Me too, I had to fullfill a fast learning curve... BUT: It is fun!

    I fully agree with you.
    I have already assimilated some notions thanks to your experience. I'm going to hang on and move on. I love learning and discovering new technologies.
    I wish you a good evening.
    Daniel


Log in to reply
 

Suggested Topics

16
Online

11.4k
Users

11.1k
Topics

112.7k
Posts