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.
-
@boots33 said in How to tell if mysensors library starts up successfully?:
#define MY_TRANSPORT_WAIT_READY_MS 3000
Hi,
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,
Lars
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
MQTT-Help me understand about the MQTT Gateway.
Development • 26 days ago • dpcons 15 days ago -
PJON and Minicore not working
Development • 7 days ago • Trand 7 days ago -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33