@nagelc wow, you're right! Last time I had bothered looking, it had been multiple years I think since the last commit.
Thanks for saying something - I had no clue!
@nagelc wow, you're right! Last time I had bothered looking, it had been multiple years I think since the last commit.
Thanks for saying something - I had no clue!
@OldSurferDude I had a few issues with a combo gateway to use nrf24 and rfm69 radios. Then saw that the code was very stagnant, and didn't want to commit to basically being my own support if issues arose in the future. I still have a few pieces lying around, but haven't been very active in using them.
I still keep hoping that it gets picked back up, but don't really expect it now. I forgot what it was, but there was at least one thing, and it feels like maybe 2 or 3 that were only available in the dev branch, and weren't really fully functional yet that I was waiting to get finished and released. I was disappointed. I still have the hardware, but it's just sitting in various boxes now.
I use ESPhome now for a similar use-case to mysensors. I'm not crazy about their yaml style "programming" that has its own rules and special cases that I haven't really wrapped my brain around. But for at least one of my projects it's really required to use it, so learning more is on my list, but so far never had the time for it.
@Vuinne-Ryvmar You seem to be confused about what this forum is. Maybe you just ended up here on a random Google search?
But in our case on an Arduino, D3 is literally the name for one of the metal legs coming off of the little controller, and we call it a pin sometimes. @tbowmo was looking for how to send the command to turn the power on or off to that part of the board, not a code to enable connecting up a controller to their phone.
I see that a D3 game controller is a thing, but I doubt you will have any luck getting help with that here. It's not what this site is about.
This is what we work with:

Are you still able to use the same analog phone plugged into the back of your modem? If so then it has to still use the same protocol, and I don't understand why the analog beacon wouldn't still work. It would just have to be on that same wire, not on the internet side of the modem. The modem is doing all of the translation in that case.
Or am I missing something? Did you have to get a new phone to use the new service?
Oh, I never even thought of that as a possibility.
I really like KiCad, and it's my preference. For a while I had Eagle for work, but even then I still preferred KiCad whenever I was given a choice. :)
@TheoL Did you not check the openhardware site link? There it has the KiCad schematic and board files. In the schematic the individual symbols mostly have pdf datasheets. I see a passive without one, but that would be easy to figure out.
So it looks to me like everything is there that you need to make your own boards. I wouldn't hesitate if I wanted to make one myself.
Unless you were asking something else? But the design source files are there.
Seems that search has been broken for quite a while. I've given up on it. (Maybe it was actually off and on, but I just had bad luck?) I just use google or duckduckgo or whatever, and then tell it to search just this site. Works great.
https://www.google.com/search?q=site%3Amysensors.org+sensors
If you look at those two sketches, in the setup() function, they both claim to set it up to use the internal pullup on pin 3. However, they do it differently. That's the first place I would look. Try replacing the non-working one with the same code from the working one.
@monics To know whether the controller was online and working, you could do something simple like request a variable from it, or just check on/request the time every so often. If it responds then things are good, and if it times out then you've got a problem and you can act on it.
@GaryStofer Okay, then sounds like you're doing what I would.
Are you able to turn on debug and connect serial to it to troubleshoot that way? Without getting more info on it, I'm out of ideas at the moment.
@GaryStofer Every time it starts up? That really removes the usefulness of using EEPROM in the first place.
Maybe you're having problems getting a response to the assignment of a child ID, and until it gets that it doesn't work???
@GaryStofer Did you erase the EEPROM? Maybe they stored the child ID number, and since it's a brand new network, they don't connect to it until some kind of timeout when they give up on the old ID? These are just guesses, and not based on any kind of deep familiarity with the code.
I just know that the ID would be stored for quicker connections on the next times it connects to the system, so that would make sense with what you describe.
I don't have a good answer, but since it's still a multiple of 5, I would assume that it's simply missing the other packets, and your sensor really is waking up and attempting? Maybe set it to require a response from the gateway before going back to sleep?
Just a guess.
Well, search seems to be broken again on the site. Hopefully a dev will see this come across their screen and know how to fix it.
I searched the site for "multiple definition" and 'premain' but neither one got ANY hits, even this topic itself!
So if you tried to search the site to see if anyone else had had this problem before, it wouldn't have much chance of success. Anyway, all that is to say that we've run into this before. I'll link below here the thread where I managed to get around it. I'm not sure if there were other threads, but this one should give you some info on how to fix it for yourself. I could find this by going into the history of posts I had made, since search was failing me.... :)
https://forum.mysensors.org/topic/10193/stm32f103c8-problem-at-compilation
@igo But in your code you have the wrong calculation. You have (R1+R2)/R2. Whether the names are right or wrong, that calculation is wrong.
But yes, I agree that it is not the root problem, that's why I also talked about trying to find it by checking pin definitions and putting voltage right on the pin.
But what @JeeLet said looks like it's worth checking. Maybe you need to try a loop of a bunch more reads to see if it improves after a bit.
Your voltage divider math is wrong. It should be of the form
R1/(R1+R2)
However, why even bother with a voltage divider? The analog inputs on the atmega328 can handle the full battery voltage from either of your scenarios.
Although, maybe you have the pin wrong? Or your setting of which board you are using is linking in a different connection? I don't know if the PDIP package would cause it to be a different pin. (I find that hard to believe, but I don't know what else to say.) Cause the reading should obviously change if you're really changing the voltage at the pin that you're reading... Maybe if you can feed direct voltage to the pin temporarily and see if it does anything?
It looks like that's the proper way to use the library - the couple of little snippets you added looked like they matched the library on github. But I would use the definition provided in the header:
BME280_REGISTER_STATUS = 0XF3,
Just to make your code easier to read.
Maybe you need to provide the rest of your code to let us see that?
How are you 'combining' the code for the gateway and the BME280 library? It sounds like the NRF52832 is running mysensors, so it should be running the BME280 code, but the ESP32 is running the gateway code. So I don't see how they could be combined? Really, we would need to see code for both boards, I think. I can't think of other things right now to help.
Sure, a resistor could, but then it's always burning power. There are current-limiting circuits that use semiconductors, but I'm not sure how efficient they are.
I'm not sure how pros would do it. There must be good ways to go about it without losing much/any power. Again it comes down to how much power it will burn vs. the practically $0 cost of a resistor vs. other choices.
Probably the only problem with a too-big capacitor is how quickly it might want to charge when everything is connected. You might need to build in some kind of rate limiting for that.
I think capacitors with a blocking diode would be the right call. How long does it need to supply power to the Arduino for? And are you running anything else off of this, or only the Arduino?
Basically, knowing how much power draw (current) that you need, and how long you need it for, and then also how much of a voltage droop is acceptable will tell you how big the capacitors need to be. I'm going to use a bunch of round numbers for easy math, but hopefully you can see how to adapt for your project.
Let's say you're at 5V, and you're drawing 100mA (a lot for just an Arduino, but not so much if you're also running LEDs and a radio, or a servo, or whatever).
If the voltage droop from the batteries due to the motors spinning up lasts for 1 second, then we just need to calculate how much charge that is, and how big the capacitor needs to be to keep it within a certain range.
The total charge, in Coulombs, is 100mA x 1 second = 100mC.
The voltage on a capacitor is: V = charge (in Coulombs) / capacitance (in Farads)
So say you want the voltage drop on the capacitor to be less than 0.5V. Then that's 10% of the initial voltage, so 10x on the capacitor (1/10%) gives you the ballpark. Which means 1F capacitor should be the ballpark you need.
Of course there's simplifications here. (And it's been a while since I did this formally - hopefully I didn't make any big mistakes.) Also real capacitors will not act the same as an ideal one, and tolerances on capacitors are HUGE. Of course the real voltage drop is an exponential, and the current draw will also have part that changes with voltage, but not the same as a resistor, so it would take a bunch of math to calculate exactly.
However, if you can get a ballpark answer and then double it or so, for tolerances, you'll probably be good enough. Heck, for a hobby level project maybe simply going 10x for a few pennies more would be a good idea.