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: best practices enabling debugging modular sensors using platformIO

Home Forums Mayfly Data Logger best practices enabling debugging modular sensors using platformIO Reply To: best practices enabling debugging modular sensors using platformIO

#12993
Sara Damiano
Moderator

    Oh, and just to note about those other build flags:

    -DSDI12_EXTERNAL_PCINT – this tells the library that you don’t want the SDI-12 library to try to monopolize the interrupts on an AVR board, which is required to make it “play nice” with the other libraries. You absolutely must set this because the SDI-12 library is a dependency of ModularSensors (even if you’re not using any SDI-12 sensors)

    -DNEOSWSERIAL_EXTERNAL_PCINT – this does the same thing to NeoSoftwareSerial. You only need this if you’re actually using that library, though it makes no difference if you define it but don’t use that library.

    -DMQTT_MAX_PACKET_SIZE=240 tells the MQTT library (PubSubClient) you need a bigger buffer for the outgoing request. The ThingSpeak publisher is the only one that uses MQTT (so far). I put it at 240 characters, which should be plenty long enough to send 8 fields to ThingSpeak (the maximum that ThingSpeak accepts at once). If you’re only using a few fields you could omit this flag, which would save you a tiny big of RAM, but be cautious because the MQTT library just won’t send the if the request length exceeds the buffer length.

    -DTINY_GSM_RX_BUFFER=512 – This is in the examples, but it really only matters if you’re using an ESP8266, AI Thinker, or Neoway M590. Don’t define it and save some some RAM with the GPRSBee.