How to tell if mysensors library starts up successfully?
I would like to turn on a LED if a node cannot find the gateway (e.g. if the distance is too large) when the node is powered up. How can that be done?
I understand that the send command returns a Boolean that tells whether a message reached the gateway. However, if the node cannot find the gateway on power up the sketch never proceeds beyond
#include <MySensors.h>. Is it possible to derive some status from this command?
you already have 3 status LED, when red led flashes there has been a transmission error.
@gohan Thank you!
The node is a sensebender micro. I would like to use the built-in LED.
I never made a node with the 3 status LEDs. It might be worthwhile for me to look more into that.
Unless you want to go the rfm69 way as they are a bit more advanced and you can read signal strength, power output and also the new driver has adaptive TX power.
@arraWX The line of code to force the node to move on if no gateway is found is
//set how long to wait for transport ready in milliseconds #define MY_TRANSPORT_WAIT_READY_MS 3000
some posts that may be of interest
@Boots33 Thank you!
Those posts provide lots of useful information.
Lars Deutsch last edited by
#define MY_TRANSPORT_WAIT_READY_MS 3000
thank you very much ! I am using the latest 2.2.rc2 version. Will give the preprocessor statement above a try ...
thank you very much,