Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timing issue or what else? #24

Open
bibo750four opened this issue Dec 2, 2023 · 5 comments
Open

Timing issue or what else? #24

bibo750four opened this issue Dec 2, 2023 · 5 comments

Comments

@bibo750four
Copy link

Hello,

Do you have any clue about this problem:

-If I transmit temp/humidity to my RMR203HG and RMR391PA units using the Transmitter.ino example using THGN132N emulation using an Arduino Uno Ethernet, all is good and both units get the data.

-If I use the same transmission code in the following sketch, the RMR391PA still reads the temperature but the RMR203HG never gets a connection.

Is it a timing issue, due to the additional code? Or what else could it be? For your information, my Arduino Uno ethernet is quite old and has a low reset value for millis().

https://gist.github.com/bibo750four/d6c2acdc8e6cf193c39e147a7f39bf5b#file-oregon_sensor_emulator_arduinojson6-ino

@bibo750four
Copy link
Author

Shoud I try to lower the send_time below 39000?

@bibo750four
Copy link
Author

I tried to reduce the send_time to 38650 because on serial monitor I observed that the average time between transmissions was 39350ms (with some variation in the range of 20-30ms). However, this did not bring any difference. One device is still reading but the other is not.

@invandy
Copy link
Owner

invandy commented Dec 4, 2023

Lets try to replace
time_marker_send = millis() + send_time;
with
time_marker_send += send_time;
in Oregon_TM.cpp

@bibo750four
Copy link
Author

Hello,
Thanks a lot for the suggestion. I tried the change in the Oregon_TM.cpp but there is no improvement in the connection behavior: one device still connects, while the other does not.
If this information can be useful: in a previous version of my sketch, that was using ArduinoJson version 5 instead of version 6, both units were connecting, but one had frequent disconnections. With ArduinoJson6 things seem to get worse.
Can it be some performance limits of my Arduino? But then what is it causing? The transmission itself is bad or just the timing between transmissions? Is it helpful to provide the output of serial monitor so you can see the timing between transmissions?

@bibo750four
Copy link
Author

Hello,
An update: I now used my sketch on an Arduino MKR Wifi 1010 and the transmission to my Oregon devices is fine. So, I guess I will not investigate the Arduino Uno Ethernet for this project anymore.
Thanks for helping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants