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

Erik G

Forum Replies Created

Viewing 4 posts - 11 through 14 (of 14 total)
  • Author
    Posts
  • in reply to: RS485 without auto direction control #13476
    Erik G
    Participant

      To answer your questions:

      -I’m using platformio on VSCode. (I’m really not comfortable using it but these kind of problems is good for actually learning hands on. There is a lot of strange things in there that I don’t understand and I wish I could find a really good tutorial how to work with it.)
      -Attached my “platformio.ini”
      -I’ve tried both manual install and to let platformio do it.
      -Now updated/upgraded/cleaned
      – This is how the lib_dep folder looks like:
      v libdeps\mayfly
      >tmp_installing-kgja50_package
      >AltSoftSerial
      >NeoSWSerial
      >SoftwareSerial_ExtInts
      -I was pretty sure AltSoftSerial was the problem since I got some errors when including it when using the mayfly board both in Arduino
      IDE and platformio but that seems to work now.
      -If I now focus on the “data_saving”-example which I know I didn’t corrupt with my own programming I might be misinterpreting the output
      based on my past problems with my own code (modified version of the Thingspeak example). When using your platformio.ini without the debugflags I get the output as attached in file “output1.txt”. Every 15 sec I get a new line of “Now running data_saving.ino on Logger XXXXX”
      When using the debug flags I get whats in output2.txt
      Then the Y504 seems to update. Maybe I was waiting for a output similar to the thingspeak-example? The testbutton didn’t work which made me assume something was wrong.

      The debug flags are very helpful. I totally missed to try them. The buffer setting in my terminal is probably to low to catch enough but i learned i can save the log to a text file with “pio device monitor > Filename.txt” in the terminal. Also very helpful.

      Oh I forgot to replace the gprsbee which I removed the

      in reply to: RS485 without auto direction control #13471
      Erik G
      Participant

        I’m totally lost. Tried the “data_saving”-example as is and the logger restarts even if I keep the enable pin at -1. Doesn’t make a difference if I detach everything from the Mayfly and I tried both different usb-cables and FTDI-cable.

        The “thingspeak” example works if I don’t add any Yosemitech libraries/sensors in the code. I wonder if I’m doing anything wrong with PlatformIO? I have to add https://github.com/SRGDamia1/NeoSWSerial.git and https://github.com/EnviroDIY/SoftwareSerial_ExternalInts.git
        to the “platformio.ini” of the “data_saving”-example even if the .ini-file on github don’t use it.

        Tried the same code with a Sodaq Mbili and it behaves exactly the same.

        Anyone who can help me where I should start with the debug?

        in reply to: RS485 without auto direction control #13465
        Erik G
        Participant

          Wow, I just realized I didn’t really post any real question and still you are helping=)I’m really thankful and impressed by all your effort.

          I have ordered a module with automatic flow control from Amazon but I didn’t want to wait for it to arrive so I started with what I had.
          The module I have has been working nicely before but this time I can’t get it to work. In the past the timing turning the Enable pin low has been tricky for me. For simple programs I’ve used delays but I tried something like Nick Gammon’s solution under “Flushing the output” RS485 communications. But not in this case.

          I using the “logging_to_ThingSpeak”-example with one Yosemitech Y504, AltSoftSerial (pins 5&6) and RE/DE on pin 4.
          On my module the RE/DE are coupled together so you only need one pin. The restart happens even if I disconnect everything from the Mayfly logger. And the only way to stop it from happen is to set the “max485EnablePin” to -1. I will try some more examples to see if I can get it right with my coding.

          in reply to: board layout files #12836
          Erik G
          Participant

            That is fantastic news! It will speed up my preparations for the coming field season. Thanks for all your work!

          Viewing 4 posts - 11 through 14 (of 14 total)