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

Sara Damiano

Forum Replies Created

Viewing 10 posts - 71 through 80 (of 465 total)
  • Author
    Posts
  • in reply to: Reading from EEPROM error in code #15192
    Sara Damiano
    Moderator

      I’ve been using primarily VSCode for a while because it loads faster on my computer, but I believe I set Atom up to force ino’s as cpp’s:  https://docs.platformio.org/en/latest/integration/ide/atom.html#force-arduino-file-as-c

      in reply to: Reading from EEPROM error in code #15186
      Sara Damiano
      Moderator

        If you’re still using the Arduino IDE, you might consider switching to VSCode (or Atom) with PlatformIO.  I know VSCode seems very scary to start with, but if you’re writing new code or even just copy-pasting chunks the linting tools it provides are invaluable.  When I created a project for your code in VSCode, it immediately highlighted the errant EEPROM line.  I know when I try write code of any type without the linter, I always screw up and miss semicolons or other small errors that are really hard to find with your eyes reading the code but which the linter flags right away.

        in reply to: Reading from EEPROM error in code #15185
        Sara Damiano
        Moderator

          I think you just missed commenting out one more reference to the EEPROM in line 144: EEPROM_read(KVALUEADDR, Kvalue); //1.0 means no change to raw readings. Just commenting or deleting that line should fix the compiler error.  I would also suggest you delete lines 38-43 so you’re not even trying to include the unused EEPROM library.

          If you wanted to, you could use the “extVoltage” sensor in ModularSensors with >1 reading to simplify all your code for reading the analog values. You would still need to create a calculated variable for the pH, conductivity, and eTape calculated from the voltage.  There’s nothing wrong, though, with reading the value and doing the calculations just as you are.

          in reply to: Case for Lower Threshold Voltage on Mayfly Stations #15179
          Sara Damiano
          Moderator

            The bottom cut-off (below which the logger will only sleep) exists so that when a near-dead or completely dead solar-powered logger suddenly sees sunshine it gives the battery some time to charge before putting any load on it.  Otherwise the logger can get in a loop of repeatedly resetting when the just-barely-charged battery browns out with any load on it.

            in reply to: Case for Lower Threshold Voltage on Mayfly Stations #15177
            Sara Damiano
            Moderator

              I’m confused by your tests and your results.  The purpose of having the voltage threshold for data upload is to conserve power for the sensors so that data will still be *collected* as long as possible, even if that data isn’t reported online.  Of course, decreasing the minimum threshold for powering the modem will increase the amount of time that the station will report data online after being charged.  But it should *decrease* the overall time that the station can collect data – which is what I would call the run time.  I would prioritize collecting data to the SD card well above reporting that data online.  If you have a station with no solar charging, I would not recommend installing a modem at all.

              Also, the reason that value is in the main program (rather than buried somewhere in the library) is so that it’s easy and obvious for the user to adjust it to their needs.  Not everyone uses a 3.7V LiPo.

              in reply to: I2C and power management #15165
              Sara Damiano
              Moderator

                I’m sorry I’m late to this.  But @mbarney the problem with turning off power to I2C devices isn’t universal.  It depends on how your external I2C device is wired.  If the SCL and SDA of your external device are directly pulled up to the incoming Vcc, then when you turn off the switched power, suddenly the system SCL and SDA will be pulled *down* to ground.  I2C lines are supposed to be pulled up, per protocol.  And there’s a bug in the Arduino Wire library that causes an infinite loop if wires are pulled down.  So everything freezes.

                I think a lot of (especially inexpensive) sensors do connect the SCL/SDA to incoming voltage without any isolation.  I know the Atlas circuits all do and it seems like your ADC does as well.  But I’ve seen other I2C devices that work fine with the Mayfly switched power going off – I think the Bosch BME280 and INA291’s I played with, but I’m not positive which others.  I’m not sure if in those cases the breakouts I had were actually isolated or if it was just luck and resistor magic that the let the internal pull ups on the Mayfly’s I2C lines overpower the pull down when power went out.  I suspect the latter.

                In theory, the I2C isolation should work.  But I haven’t ever actually bought an isolator myself to test.

                in reply to: Documentation fix: Getting Started page #15154
                Sara Damiano
                Moderator

                  Fixed!  Thank you!

                  in reply to: Announcement: New ModularSensors release v0.28.01 #15151
                  Sara Damiano
                  Moderator

                    I *think* when Platformio pulls it, they pull from a compressed version on their own registry.

                    in reply to: Calculated Variable Celsius to Fahrenheit DS18 #15149
                    Sara Damiano
                    Moderator

                      The print-outs are always going to be updated about a minute behind because the board will go to sleep at the end of the logdata() function and won’t do the printing until the next time it wakes up (which will be the next minute).

                      in reply to: Calculated Variable Celsius to Fahrenheit DS18 #15148
                      Sara Damiano
                      Moderator

                        Sorry, the formatter and I were having an argument. I think it’s right now.

                      Viewing 10 posts - 71 through 80 (of 465 total)