-
Sara Damiano replied to the topic Calculated Variable Celsius to Fahrenheit DS18 in the forum Mayfly Data Logger 3 years, 9 months ago
The C-to-F is working for me with this calculation function:
float calculateTempF(void) { float TempCFromMaximDS18_Temp = ds18Temp->getValue(); float TempF = (TempCFromMaximDS18_Temp)*1.8 + 32; if (TempCFromMaximDS18_Temp == -9999) { TempF = -9999; } // Serial.print("DS18 Temperature in Celsius:"); //…
-
Sara Damiano replied to the topic Calculated Variable Celsius to Fahrenheit DS18 in the forum Mayfly Data Logger 3 years, 9 months ago
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.
-
Sara Damiano replied to the topic Calculated Variable Celsius to Fahrenheit DS18 in the forum Mayfly Data Logger 3 years, 9 months ago
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. -
Sara Damiano replied to the topic Calculated Variable Celsius to Fahrenheit DS18 in the forum Mayfly Data Logger 3 years, 9 months ago
-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 a…[Read more] -
Sara Damiano replied to the topic Announcement: New ModularSensors release v0.28.01 in the forum Environmental Sensors 3 years, 9 months ago
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 ve…[Read more] -
Sara Damiano replied to the topic Calculated Variable Celsius to Fahrenheit DS18 in the forum Mayfly Data Logger 3 years, 9 months ago
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 replacenew MaximDS18_Temp(&ds18, "12345678-abcd-1234-ef00-1234567890ab"),
with justds18Temp,
. And you…[Read more] -
Sara Damiano replied to the topic Calculated Variable Celsius to Fahrenheit DS18 in the forum Mayfly Data Logger 3 years, 9 months ago
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 justCalcTempF,
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…[Read more]
-
Sara Damiano started the topic Announcement: New ModularSensors release v0.28.01 in the forum Environmental Sensors 3 years, 9 months ago
Yesterday, I put out a new release of the ModularSensors library: https://github.com/EnviroDIY/ModularSensors/releases/tag/v0.28.01
Here are some of the highlights of the changes:
- Fixed a large bug in the SDI-12 code that was introduced in v0.27.5 (2020-12-15)
- Added support for Turner Cyclops-7F submersible fluorometers
- Some minor…
-
Sara Damiano replied to the topic How to save sketches in the forum Mayfly Data Logger 3 years, 9 months ago
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.
-
Sara Damiano replied to the topic How to save sketches in the forum Mayfly Data Logger 3 years, 9 months ago
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
-
Sara Damiano replied to the topic Printing floats with MS_DBG() in the forum Mayfly Data Logger 3 years, 9 months ago
The Arduino print function defaults to two decimal places for a float. Normally, if you were using
Serial.print(float)
you could control the decimal places withSerial.print(float, decimalPlaces)
. But because of the way the MS_DBG macro is written, that won’t work. You’ll have to create a String from the number and then MS_DBG that:MS_DBG(Stri…
[Read more] -
Sara Damiano replied to the topic Transfer file from SD card to iOS/Android via bluetooth in the forum Infrastructure and Equipment 3 years, 9 months ago
I was reading up on the BLE support on the XBee3. I think the only way to send data over Bluetooth is with Digi API frames. You can use the on-board micropython, but from what I can tell, that uses the API frames under the hood. So apart from having to figure out how to use the Mayfly to switch the XBee3 into API mode and properly ch…[Read more]
-
Sara Damiano replied to the topic Transfer file from SD card to iOS/Android via bluetooth in the forum Infrastructure and Equipment 3 years, 9 months ago
That’s great! I’m sorry, I was imagining you had the entire set-up, Mayfly and all, running on batteries and sealed under water
-
Sara Damiano replied to the topic Optical dissolved oxygen solutions? in the forum Environmental Sensors 3 years, 9 months ago
You should be using the same modbus address that you use when connected to the computer.
Looking at the datasheet again, I told you the wrong connections. I’m sorry. Only Y/Z are available in half-duplex mode, not A/B. So you need to move A->Y and B->Z. Turn off the Y/Z termination dip switch (I think). I also told you the wrong pins for…[Read more]
-
Sara Damiano replied to the topic Optical dissolved oxygen solutions? in the forum Environmental Sensors 3 years, 10 months ago
You’re not “overwriting” the serial connection. The USB connection on the SAMD21 is a bit touchy and will fail if anything in the program fails. In you’re program in lines 117 and 119 you’re calling
Serial.println(...)
and asking it to print the results of a function that returns void. That’s most likely causing the crash. It probably wou…[Read more] -
Sara Damiano replied to the topic Stability Testing ~ how to do it? in the forum Mayfly Data Logger 3 years, 10 months ago
Did the extra power smoothing work for you? I’ve noticed the issues with the WiFi XBee’s, but I wasn’t having them drop that frequently and we don’t have any “production” loggers deployed with WiFi, so I never bothered to try and fix anything.
-
Sara Damiano replied to the topic Transfer file from SD card to iOS/Android via bluetooth in the forum Infrastructure and Equipment 3 years, 10 months ago
I’m sorry, I’ve never tried anything with Bluetooth, so I’m only guessing here.
If the Bluetooth chip is that simple, and you have it connected to TXD and RXD on your Mayfly, you should print to the bluetooth using just
Serial.print
and not do anything with SoftwareSerial.Serial
is the TXD and RXD on the Mayfly. You could also connect it to T…[Read more] -
Sara Damiano replied to the topic Optical dissolved oxygen solutions? in the forum Environmental Sensors 3 years, 10 months ago
Oh, bother, and I missed that the chip on the RS485 shield does not have automatic flow control and the DE and REnot aren’t even on the same pin. The library has support for a single DE/REnot pin, but for two separate pins. You’ll need to physically join those pins for the library to work. Run a jumper wire between A4 and A5 and then use ei…[Read more]
-
Sara Damiano replied to the topic Optical dissolved oxygen solutions? in the forum Environmental Sensors 3 years, 10 months ago
Ok, I’m looking at the Arduino website now.
So it looks like the MKR is a SAMD21 based board, not an AVR based board like the UNO. So, then, yes, just including AltSoftSerial will cause the code to fail to compile because AltSoftSerial is AVR only.
Based on the schematics, the MKR RS485 shield connects the Tx and Rx of the RS485 to
Serial1
of…[Read more] -
Sara Damiano replied to the topic Optical dissolved oxygen solutions? in the forum Environmental Sensors 3 years, 10 months ago
@madbird – I’m sorry, I’m not at all familiar with the MKR or any of its shields. For anything to work, you need to know what kind of serial port you need and how the pins are connected. Merely creating and not using an AltSoftSerial instance shouldn’t be a problem at all. But, of course, nothing’s going to work if you don’t tell the code th…[Read more]
- Load More