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 - 81 through 90 (of 465 total)
  • Author
    Posts
  • in reply to: Calculated Variable Celsius to Fahrenheit DS18 #15147
    Sara Damiano
    Moderator

      Here’s the version without the extra un-needed BME code.  I left in all the code for the display.

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

        The C-to-F is working for me with this calculation function:

        And this variableArray:

        But I don’t have a BME280 on my desk so I commented out all of that code to get it to work. I also don’t have a working XBee3 right now, so I couldn’t test with that. I don’t think those would interfere, but I’m just warning you that my testing isn’t exactly what you have.

        Are you planning to keep the code for displaying on the little screen? You could simplify your code by removing all of the extra code for the BME280 and then displaying the result of the BME280 by using the variables you created for it for the logger. So, replace display.print("T: "); display.print(sensors.getTempCByIndex(0)); display.println(" C"); with display.print("T: "); display.print(bme280Temp->getValueString()); display.println(" C"); and so forth. If you want, on Monday I can write up a simpler version for you following that model.

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

          Hm.  Can you post your current code? I’ll try running it.  I have a DS18 here so hopefully once I attach things and start trying to run them whatever issue I’m missing will jump out at me.

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

            You can throw a Serial.println(TempCFromMaxiumDS18_Temp); into the middle of your calculation equation just for testing.  I can try testing your code myself later this afternoon.

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

              -17966.20 does seem a little bit cold for most offices.  Did you change your variable array so it has the ds18Temp named variable in it instead of the other new variable?  If not update step will update that other new variable and not the one that you’re calculating F from, though adding the “true” to the getValue should force it to update anyway.  Is the Celsius temperature from the DS18 reasonable?

              Using true*1.8+32 will give you 33.8 no matter what happens.  In the multiplication “true” is converted to “1” so your equation is just (1*1.8)+32 = 33.8.

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

                Thank you @mbarney!  That’s all correct!

                And just FYI, prior to version ~5 of PlatformIO, libraries were only updated in the PlatformIO registry when the registry crawler got to it and noticed the change.  So sometimes it would be a day or two before you could see the updates using the pio lib update or similar commands.  With the current version, I can notify the PIO registry when I put out a new release so the new version should be visible within just a few minutes.

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

                  Does that make sense?

                  So, for example, in line 178 you created a variable for the DS18 (Variable *ds18Temp = new MaximDS18_Temp(&ds18, "12345678-abcd-1234-ef00-1234567890ab");) Since you’ve already done that, down in line 234 instead you can replace new MaximDS18_Temp(&ds18, "12345678-abcd-1234-ef00-1234567890ab"), with just ds18Temp,.  And you can do the same with all of the other variables.

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

                    In line 237 you don’t need the “new” or anything else with the calcTempF.

                    Replace new CalcTempF(&ds18, "12345689-abcd-1234-ef00-1234567890ab"), with just CalcTempF,

                    You’ve already created and named the variable, so you don’t need to re-create it, just reference it. Actually, since you’ve created all your variables with names, you should reference all of them that way instead of creating a second identical one for each of them. So in your variable array, you can replace almost all of the new ... with the names you gave the variables in the sensor blocks. The result will look more like the VariableArray in the data saving example: https://github.com/EnviroDIY/ModularSensors/blob/149bb59cdb34f7d54d26cd4a81b7e7a90eabced8/examples/data_saving/data_saving.ino#L318

                    in reply to: How to save sketches #15126
                    Sara Damiano
                    Moderator

                      If it’s not going back to 2000, your battery is ok.

                      Is the board still running the “now” or “adjust” sketch?  If so, every time the board re-starts, it will reset to whatever time you told it in that program.

                      in reply to: How to save sketches #15124
                      Sara Damiano
                      Moderator

                        Do you have a coin battery in the slot?  Could that battery be dead?  If you don’t have a battery in the coin slot or if it’s dead, then the clock will reset to Jan 1, 2000 every time the board is unplugged from the computer or battery

                      Viewing 10 posts - 81 through 90 (of 465 total)