Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: RS485 without auto direction control

Home Forums Mayfly Data Logger RS485 without auto direction control 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.