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 10 posts - 1 through 10 (of 14 total)
  • Author
    Posts
  • in reply to: Geographically Scaling Modular Sensors #17366
    Erik G
    Participant

      This is very interesting @neilh20 ! I learnt something new reading up on HEX- and INI-files and it would be of great help with a method like this.

      I will try your examples and see if I can be of any help.

      Erik G
      Participant

        Sorry for being so vague. I will try to clarify.

        Is it not the order of the parameters given in the constructor that matters when creating a new object?

        If the sensor constructor looks like this:

        And the initialization like this:

        Would not the power pins be the opposite of intended?

         

        Erik G
        Participant

          Hi Neil,

          It is very basic but I guess every journey must start somewhere…

          The first code snippet is from the example code in the menu a la carte example. I’ve edited my first post just to clarify that.

          The second one is from the Modular sensor library.

           

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

            Yes, that is true. We could maybe use 50 cards but I probably won’t make it right the first time and then I have 50 cards to recycle.

            I used the board file to make some shields but this is something another level. I will have a look around at the University for some expertise in the matter.

            Maybe it is simpler for us to use something like a feather board and build from that. But the Mayfly is very convenient for our needs. I have used the Sodaq Mbili as well but had more trouble with that and I’m missing the stackable pin headers.

            To bad it is so difficult to order boards from the US. I ordered one of the 0.4 boards years ago and it has been very handy.

            Thanks for your input @neilh !

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

              I have been thinking about order some Mayfly boards through some PCB assembly service (because the board is not available in Sweden where I live).

              Does anyone have any suggestions or hints how to do it with the Mayfly board?

              I saw somewhere that Shannon Hicks soldered some parts of the board herself. I guess I can try to order the board and see which parts might be a problem but any help is appreciated!

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

                I’m not expecting you to fix all my problems, but I’m very grateful for any help I can get. I prefer this kind of bug though…

                It was actually very instructive to go through the libraries and trying to learn how they work. It was driving me nuts when it was working with the deep debug flag but it finally made sense.

                I totally missed @neilh’s fix before doing the debug. I got some help and was doing some serial debug through the libraries before reaching the conclusion. I have now learned I can check out github for known issues before trying to find them myself=)

                I was trying to add a Null stream object (since someone pointed me in that direction) but didn’t finish in time so I deployed with the debug flag. Will try the fix later.

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

                  Finally some progress when I got some help.

                  In the modified ThingsSpeak sketch the constructor was the problem.
                  YosemitechY504 y504_1(y504ModbusAddress1, modbusSerial, modbusSensorPower, max485EnablePin, y504NumberReadings); -> did not work
                  YosemitechY504 y504_2(y504ModbusAddress2, modbusSerial, rs485AdapterPower, modbusSensorPower, max485EnablePin, y504NumberReadings);->Works. I don’t know how I lost one of the power pins but that explains why it worked better from the beginning.

                  Back to the original problem…
                  The logger crashes if I set the EnablePin to >0 and don’t set the -D MS_YOSEMITECHPARENT_DEBUG flag
                  In setup the program enters and don’t return from varArray.setupSensors();

                  In YosemitechParent.ccp (line 67-69) the debugStream is null if not in debug.

                  In SensorModbusMaster (line 683-690) it ends up with the null pointer

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

                      It feels like a memory leak but I can’t see why. I tried to modify the thingspeak example but then everything got messed up and the pins scramled. I’ll try with another computer and see if I can find the bugs in my code. Probably something very simple.

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

                        My reply is very hard to read especially when all my spacing got removed. Sorry for that:)

                        Attaching a .ini didn’t work so here it is:

                      Viewing 10 posts - 1 through 10 (of 14 total)