Hi,
I have made some changes to my controller, and things are not behaving quite as I would expect.
I have checked the individual functions and triggers and all work as they should.
What would really help me, is to be able to drill down into the relay activity to see when relays were activated.
For example, when I look at the portal, I can see relay activity, but only if the relay has activated for a fair period of time.
If for example, my relay is only activated for a matter of seconds, is it possible to somehow view the detailed activity of when the relay was switched on and off.
Hope this makes sense!!
Is there a way to get a more detailed view of relay activity
Re: Is there a way to get a more detailed view of relay acti
You can use serial monitor to dump your relay activity
Roberto.
Re: Is there a way to get a more detailed view of relay acti
Thanks Roberto, so maybe a silly question, how do I do that? Lets say I want to get a "dump" of relay 1 and relay box 1- relay 1? Also is it possible to drill down to a particular period I am interested in?rimai wrote:You can use serial monitor to dump your relay activity
Thanks
Re: Is there a way to get a more detailed view of relay acti
Code: Select all
Serial.println(ReefAngel.Relay.Status(Box1_Port1));
[code]
You may need to want to check if the relay status has changed to print anything or it will flood the status on your serial monitor.
You will know what I mean if you use just this line.
Roberto.
Re: Is there a way to get a more detailed view of relay acti
rimai wrote:Code: Select all
Serial.println(ReefAngel.Relay.Status(Box1_Port1)); [code] You may need to want to check if the relay status has changed to print anything or it will flood the status on your serial monitor. You will know what I mean if you use just this line.[/quote] Do I need to connect the head unit via the usb cable for this? Also, what baud setting etc do I need for the serial monitor? Lastly, do I enter the text just as you put with the [code] at beginning and end? Sorry to ask so many probably stupid questions!!
Re: Is there a way to get a more detailed view of relay acti
Also, how do I just check for a relay status change?rimai wrote: You may need to want to check if the relay status has changed to print anything
You will know what I mean if you use just this line.
thanks!!
Re: Is there a way to get a more detailed view of relay acti
Yes, you need the usb-ttl cable connected at 57600 baud.
You need to put it in your loop.
I'd do something like this:
You need to put it in your loop.
I'd do something like this:
Code: Select all
byte lastdata=0;
void setup()
{
...
...
}
void loop()
{
...
if (lastdata!=ReefAngel.Relay.RelayData)
{
lastdata=ReefAngel.Relay.RelayData;
Serial.println(ReefAngel.Relay.Status(Box1_Port1));
}
}
Roberto.