[SOLVED] Radio Traffic leds on Repeater?



  • Hello,

    On the Advanced Gateway Options page it says that you can add radio traffic leds.
    I read somewhere(?) that it is for the gateway and sensors but no mention of the repeater.
    but my question, I'm in the process of hooking up a repeater, which works great by the way,
    except for the traffic leds. Is it possible to add radio traffic leds to the repeater ?

    here is the code part I copied from the Advanced Gateway Options page and added to the repeaternote.ino sketch. And of course made sure to follow the connection instructions.
    Even reversed the whole so the leds stay on and should go off in case of transmission or error but neither versions work.

    • REVISION HISTORY
    • Version 1.0 - Henrik Ekblad
    • DESCRIPTION
    • Example sketch showing how to create a node that repeates messages
    • from nodes far from gateway back to gateway.
    • It is important that nodes that has enabled repeater mode calls
    • process() frequently. Repeaters should never sleep.
      */

    // Enable debug prints to serial monitor
    #define MY_DEBUG

    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69

    // Enabled repeater feature for this node
    #define MY_REPEATER_FEATURE

    // Flash leds on rx/tx/err
    #define MY_LEDS_BLINKING_FEATURE
    // Set blinking period (in milliseconds)
    #define MY_DEFAULT_LED_BLINK_PERIOD 300

    #define MY_DEFAULT_ERR_LED_PIN 4
    #define MY_DEFAULT_TX_LED_PIN 5
    #define MY_DEFAULT_RX_LED_PIN 6

    #include <SPI.h>
    #include <MySensors.h>

    etc.

    If someone can acknowledge the possibility of adding leds to the repeater i would be grateful. If yes why don't they work ?

    Regards
    Frank


  • Admin

    Yes, you can activate traffic leds on any node type.



  • @hek

    Thanks for the confirmation, also an idea why it may not work ?
    I followed the connections and added the code.. ?!

    regards
    Frank


  • Admin

    You you're running the dev-branch, it should be enough to define the pins.. The feature-define is no longer needed.

    https://github.com/mysensors/MySensors/blob/80659ddb00b4811f8e6f9d90221ec796722b79b5/MySensors.h#L106



  • I can confirm YFandS's findings.
    My node running in repeater mode does not flash the RX/TX/ERR leds.
    The same node running a gateway sketch happily flashes the LED's.

    Cheers.
    /Ghydda



  • @Ghydda said:

    My node running in repeater mode does not flash the RX/TX/ERR leds.

    Well it came to me. Rookie mistake.
    The defines for my alternate LED port pins was listed below the MySensors.h include statement and not above it.
    Once I corrected this error, my traffic LED's blink happily.


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 5
  • 2
  • 6

11
Online

11.4k
Users

11.1k
Topics

112.7k
Posts