Community Forum
    • Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Compile error

    Scheduled Pinned Locked Moved TH02
    th02libraryarduino
    3 Posts 2 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      arnewiig
      last edited by

      Hi, I was super happy to find your library for the TH02. I just got a few of the sensors and I’m testing them right now. However, I do get a compile error indicating something going wrong with the TH02 lib.. but I’m not sure. Do you see anything out of the ordinary here…? Other I2C sensors I have works fine using the Wire lib. Grateful for all you work and hoping to be able to use it!

      Here is a verbose output from the compiler, compiling the example from your library, the error is in bold at the bottom:

      Arduino: 1.5.6-r2 (Mac OS X), Board: “Arduino Uno”

      Build options changed, rebuilding all
      Using library Wire in folder: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire (legacy)
      Using library TH02 in folder: /Users/Bo/Documents/Arduino/libraries/TH02 (legacy)

      /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire -I/Users/Johannes/Documents/Arduino/libraries/TH02 /var/folders/aE/aE8AHBi2FKulZG-bTdnaYU+++TI/-Tmp-/build1193856155966205342.tmp/GetTempHum_test.cpp -o /var/folders/aE/aE8AHBi2FKulZG-bTdnaYU+++TI/-Tmp-/build1193856155966205342.tmp/GetTempHum_test.cpp.o
      /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire -I/Users/Johannes/Documents/Arduino/libraries/TH02 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/utility /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/Wire.cpp -o /var/folders/aE/aE8AHBi2FKulZG-bTdnaYU+++TI/-Tmp-/build1193856155966205342.tmp/Wire/Wire.cpp.o
      /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire -I/Users/Johannes/Documents/Arduino/libraries/TH02 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/utility /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/utility/twi.c -o /var/folders/aE/aE8AHBi2FKulZG-bTdnaYU+++TI/-Tmp-/build1193856155966205342.tmp/Wire/utility/twi.c.o
      /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire -I/Users/Bo/Documents/Arduino/libraries/TH02 -I/Users/Bo/Documents/Arduino/libraries/TH02/utility /Users/Bo/Documents/Arduino/libraries/TH02/TH02.cpp -o /var/folders/aE/aE8AHBi2FKulZG-bTdnaYU+++TI/-Tmp-/build1193856155966205342.tmp/TH02/TH02.cpp.o
      /Users/Bo/Documents/Arduino/libraries/TH02/TH02.cpp: In member function ‘uint8_t TH02::readRegister(uint8_t, uint8_t*)':
      /Users/Bo/Documents/Arduino/libraries/TH02/TH02.cpp:85: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
      /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/Wire.h:58: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
      /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/Wire/Wire.h:56: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)

      1 Reply Last reply Reply Quote
      • A Offline
        arnewiig
        last edited by

        fyi. this compile error is on a mac os x. it works fine from my windows 7 PC.

        1 Reply Last reply Reply Quote
        • CharlesC Offline
          Charles
          last edited by

          Arnewiig,

          I’ve updated the repo, would you mind trying with the fixed version and let me know please ?

          Thanks

          Charles

          1 Reply Last reply Reply Quote
          • First post
            Last post

          1

          Online

          5.7k

          Users

          534

          Topics

          5.0k

          Posts

          Top Topics

          • Bonjour Nicolas
            Nicolas BernaertsN
            Nicolas Bernaerts
            0
            19
            353

          • Denky 4 - Domoticz - Triphasé -
            Nicolas BernaertsN
            Nicolas Bernaerts
            0
            7
            101

          • Denky D4 et Linky Standard TInfo Rx Non Configuré
            CharlesC
            Charles
            0
            5
            142

          • CC1101 mini shield pour raspberry
            CharlesC
            Charles
            0
            5
            162

          • CC1101
            CharlesC
            Charles
            0
            2
            71

          Popular Tags

          teleinfo
          24 topics
          arduino
          19 topics
          remora
          16 topics
          esp8266
          10 topics
          arduipi
          10 topics
          wifinfo
          7 topics
          raspberry
          7 topics
          broadcast
          7 topics
          Copyright © 2022 Charles-Henri Hallard | Return to blog page | Powered by NodeBB