Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Problems compiling Logging_to_EnviroDIY example in ModularSensors

Home Forums Mayfly Data Logger Problems compiling Logging_to_EnviroDIY example in ModularSensors

This topic contains 3 replies, has 2 voices, and was last updated by  Sara Damiano 1 month ago.

  • Author
  • #6264

    Patrick Lorch

    I am relatively new to sensor programing and the MayFly. Not sure if this is the right place for this question.

    I have been trying to run a simple example of the Logging_to_EnviroDIY in the ModularSensors examples. I cannot get it to build in Platformio. There are many scoping errors like the ones below.

    Does modularSensors or this example require a particular version of RTCZero library?

    My version of the example code is below with

    Build output sample (with some stuff cut out):
    [Mon Feb 19 16:27:24 2018] Processing mayfly (platform: atmelavr; board: mayfly; framework: arduino)
    Warning! Library {'requirements': None, 'name': '# Using library Id'} has not been found in PlatformIO Registry.
    You can ignore this message, if {'requirements': None, 'name': '# Using library Id'} is a built-in library (included in framework, SDK). E.g., SP
    I, Wire, etc.

    Verbose mode can be enabled via -v, --verbose option
    PLATFORM: Atmel AVR > EnviroDIY Mayfly
    SYSTEM: ATMEGA1284P 8MHz 16KB RAM (127KB Flash)
    Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    Collected 69 compatible libraries

    Scanning dependencies…
    Dependency Graph
    |– <EnviroDIY_ModularSensors> v0.6.4-beta
    | |– <EnviroDIY_DS3231> v1.3.2
    | | |– <Wire> v1.0
    | |– <EnableInterrupt> v0.9.8
    | |– <SdFat> v1.0.5
    | | |– <SPI> v1.0
    | |– <Adafruit ADS1X15> v1.0.0
    | | |– <Wire> v1.0
    | |– <Adafruit Unified Sensor> v1.0.2
    | |– <DHT sensor library> v1.3.0
    | | |– <Adafruit Unified Sensor> v1.0.2
    | |– <Adafruit AM2315> v1.0.1
    | | |– <Wire> v1.0
    | |– <Adafruit BME280 Library> v1.0.7
    | | |– <Adafruit Unified Sensor> v1.0.2
    | | |– <SPI> v1.0
    | | |– <Wire> v1.0
    | |– <OneWire> v2.3.2
    | |– <DallasTemperature> v3.7.8
    | | |– <OneWire> v2.3.2
    | |– <Arduino-SDI-12_ExtInts> v1.0.1 #6d07f65
    | |– <TinyGSM> v0.3.1 #83e41c4
    | |– <SensorModbusMaster> v0.6.4
    | |– <YosemitechModbus> v0.1.11
    | | |– <SensorModbusMaster> v0.6.4
    | |– <RTCZero> v1.5.2 #None
    |– <EnableInterrupt> v0.9.8
    Compiling .pioenvs/mayfly/src/main.o
    In file included from src/main.cpp:32:0:
    .piolibdeps/EnableInterrupt_ID311/EnableInterrupt.h:22:125: note: #pragma message: NOTICE: *** EnableInterrupt library version pre-0.9.6. This is n
    ot a problem. Keep calm, and carry on. ***
    #pragma message(“NOTICE: *** EnableInterrupt library version pre-0.9.6. This is not a problem. Keep calm, and carry on. ***”)
    Compiling .pioenvs/mayfly/lib83c/RTCZero/RTCZero.o
    In file included from .piolibdeps/RTCZero/src/RTCZero.cpp:22:0:
    .piolibdeps/RTCZero/src/RTCZero.h:32:26: error: ‘RTC_MODE2_MASK_SEL_OFF_Val’ was not declared in this scope

  • #6265

    Patrick Lorch

    Trying again with the code…

    1. SampleMain.txt
  • #6279

    Sara Damiano

    Great that you’re using PlatformIO; it really is a big improvement over the Arduino IDE!

    Do you mind sharing your platformio.ini file? It should look very much like this:

    The “lib_ignore = RTCZero” is needed for AVR boards (like the EnviroDIY Mayfly). That library is for SAMD boards (like a Sodaq Autonomo or Arduino Zero) that have a clock in the processor. If you don’t tell PlatformIO to ignore the library it will try to build it and you’ll end up with errors like you’re seeing. Also the “lib_ldf_mode = deep” might be needed because sometimes it misses dependencies otherwise.

  • #6280

    Sara Damiano

    Oops, delete the “@>=0.6.7” after ModularSensors. That’s the version that I’m working on and it hasn’t been released yet so PlatformIO won’t find it.

You must be logged in to reply to this topic.