Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: Newbie Mayfly Setup for RS485 sensor to internet

Home Forums Mayfly Data Logger Newbie Mayfly Setup for RS485 sensor to internet Reply To: Newbie Mayfly Setup for RS485 sensor to internet

#12521
neilh20
Participant

    Gosh thanks for the info. Definitely very useful.

    Sara some amazing classes you’ve put together. Thankyou Thankyou.

    They really hummed for me. Still amazed the way they hang together – that’s the fun of optimizing it makes it look simple.
    I usually add a serial debug with a time stamp to watch how long it takes.
    Just wondering – I can see some debug capability built in MS_DBG macro – is it possible to enable it, or the serial debug in some way.
    I tried adding to platformio.ini
    build_flags = -DDEBUGGING_SERIAL_OUTPUT
    and it compiled some modules, and then came up with an error somewhere – making it look like it should only be done on specific files.?

    For the keller nanolevel it wouldn’t respond to the same modbus requests as Keller acculevel šŸ™ – so I ended up having to change the message structure to what I had used on another project.

    I expanded “enum kellerModel” and introduced _model to the kellerMobdus – following yosemitech. Its some very ace class structures…

    So effectively I’ve created a KellerNanolevel.h and modified KellerParent.h/cpp and KellerModbus.cpp/h. Would you like me to submit a pull request for it.?
    PlatformIO is very flexible, and to get started (hadn’t read your emails) I ended up with
    Documents\Arduino\env01\nanolevel\logging_to_EnviroDIY.ino and platformio.ini
    In platformio.ini
    [platformio]
    ;src_dir = logging_to_EnviroDIY
    src_dir = .

    Then created
    Documents\Arduino\env01\nanolevel\lib\KellerNanolevel\src – where it automatically looked for source files
    and then copied in files and gave them unique names to make changes
    KellerNanolevel.h KellerNanoParent.h KellerNanoParent.cpp

    Cheers

    So an output with my new sensor enabled and the internal sensors.

    Data Logger: nh05a ExternalVoltage MaximDS3231 KellerNanolevel KellerNanolevel EnviroDIY Mayfly
    Data Logger: nh05a voltage temperatureDatalogger gaugeHeight temperature Free SRAM batteryVoltage
    Data Logger: nh05a volt degreeCelsius meter degreeCelsius Bit volt

    Date and Time in UTC-8 extVoltage BoardTemp kellerHeight kellerTemp FreeRam Battery
    1/3/2000 15:22 5.89625 23.5 -0.0053 22.35 12758 13.387
    1/3/2000 15:30 5.89125 23.5 -0.0053 22.37 12758 13.387
    1/3/2000 15:32 5.89625 23.5 -0.0052 22.39 12758 13.387