Transmit LED always lit on gateway?
-
OK - I'll work on it and send a pull request when I'm done. The ethernet and serial code seems pretty clear wrt the LED's so I'll just use that as a template.
-
FYI - I removed all the LED pin handling from the MQTT gateway and changed the blink calls to go through the gateway. Reloading and I get the TX and RX lights continuously lit. So I thought I must be missing something so I build the plain ethernet gateway w/ LED support and I get the same thing - TX and RX lights are lit with nothing happening.
So either my wiring is screwed up or something is wrong w/ the 1.5 LED code. I'm going to start looking into that and if I find anything I'll open a github issue and get a fix submitted.
-
@hek I think this might be a documentation problem in the web site. The code sets the LED pins to OUTPUT and LOW for off, HIGH for on. The web site (http://www.mysensors.org/build/advanced_gateway) says:
"Each LED is connected by its anode (long leg) to +5V. The cathode (short leg) is connected through a resistor to one of the following digital pins of the Arduino"
At least the way I read the code, it should say something like:
"Each LED is connected by its anode (long leg) to the digital pin. The cathode (short leg) is connected through a resistor to ground."
Does that sound right?
-
The documentations for this has not been updated in long time (should at least mention WITH_LEDS_BLINKING now!). I will update.
I'm confused now, do you mean that the behaviour changed with this pull request?
https://github.com/mysensors/Arduino/pull/109/filesOr has this been wrong for a longer period? It would be quite easy to have a MY_INVERSE_LEDS-define option in MyConfig to help people decide how to wire this themselves.
-
I'm not sure when it changed (or if it was wrong the whole time) - just that it didn't work for me with the mqtt gateway or the ethernet gateway. I will set up a pull request to update the MqttGateway to use WITH_LEDS_BLINKING. I don't think there is any reason to have it different than the other gateways. The code is trivial - I'm just waiting on some sensor nodes so I can properly test it.
-
The documentations for this has not been updated in long time (should at least mention WITH_LEDS_BLINKING now!). I will update.
I'm confused now, do you mean that the behaviour changed with this pull request?
https://github.com/mysensors/Arduino/pull/109/filesOr has this been wrong for a longer period? It would be quite easy to have a MY_INVERSE_LEDS-define option in MyConfig to help people decide how to wire this themselves.
@hek FYI - here's the commit that reversed the LED pins 23 days ago. The note doesn't say why it was done. https://github.com/mysensors/Arduino/commit/4abaa6ded34d22e3f3dd98d33d3d12450a537706#diff-957e773aa509ae0ea23a62fad74212a4
-
I've been using a version of the mqtt gateway for about 6 months, i setup the LED's like it shows in the advanced build, and they all (3) run with on all the time, and off when activated, i assumed at the time that this was by design, and it's quite nice to have a clear visual indication that things are all ok, with the occasional blink when there is a message received. i quite like it now. my file was compiled with version 1.4.1 modified library. but i believe it was the same behavior with 1.4 also.
Just incase it helps.