[SOLVED] Only TX led is blinking, ERR and RX led are alway on



  • I am using v2.0.0 in Arduino ide 1.6.5 and RFM69 radios.
    I am running MockMySensors example on the node and have the following defines:

    #define MY_LEDS_BLINKING_FEATURE
    #define MY_DEFAULT_ERR_LED_PIN 5  
    #define MY_DEFAULT_RX_LED_PIN    6  
    #define MY_DEFAULT_TX_LED_PIN    7 
    
    #include <MySensors.h>  
    

    In the terminal of the node I see these ok messages:

    #########################
    RandomNumber:58
    Send Battery Level
    TSP:MSG:SEND 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=ok:58
    Request Time
    TSP:MSG:SEND 254-254-0-0 s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=ok:
    Door is: Closed
    TSP:MSG:SEND 254-254-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=ok:0
    System is: Armed
    TSP:MSG:SEND 254-254-0-0 s=1,c=1,t=15,pt=1,l=1,sg=0,ft=0,st=ok:1
    Temperature is: 25
    TSP:MSG:SEND 254-254-0-0 s=7,c=1,t=0,pt=4,l=4,sg=0,ft=0,st=ok:25
    TSP:MSG:SEND 254-254-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=ok:58
    #########################
    

    MY_DEFAULT_ERR_LED_PIN and MY_DEFAULT_RX_LED_PIN are always on and only MY_DEFAULT_TX_LED_PIN is blinking.

    Is this normal behaviour?


  • Mod

    @gvorster could it be that the leds that are always on are connected inverted wrt the one that's working?
    What hardware are you using and how are the leds connected?



  • @Yveaux said:

    @gvorster could it be that the leds that are always on are connected inverted wrt the one that's working?
    What hardware are you using and how are the leds connected?

    I tested a blink sketch on all 3 pins and they are working.
    Also when I switch the pins to:

    #define MY_DEFAULT_ERR_LED_PIN 6 
    #define MY_DEFAULT_RX_LED_PIN    7 
    #define MY_DEFAULT_TX_LED_PIN    5
    
    or
    
    #define MY_DEFAULT_ERR_LED_PIN 5  
    #define MY_DEFAULT_RX_LED_PIN    7  
    #define MY_DEFAULT_TX_LED_PIN    6
    

    still only TX is blinking and other leds are always on.

    However I'm using a bare ATMEGA328P in QFP package running on the Arduino Pro Mini 3.3v 8mhz bootloader on a diy pcb board.

    I will try it later today on a Nano on breadboard.



  • How are the leds connected to the arduino? Are the LEDs connected to ground or 5V?



  • @gloob said:

    How are the leds connected to the arduino? Are the LEDs connected to ground or 5V?

    Ah, sorry my bad. That's it. I had it turned around.
    Should have rtfm:

    "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:"



  • @Yveaux said:

    @gvorster could it be that the leds that are always on are connected inverted wrt the one that's working?
    What hardware are you using and how are the leds connected?

    Yes that's it I had it turned around.


  • Mod

    @gvorster That's why I asked ;-)
    Well, good to hear you solved it :+1:


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.