How to change port labels in controller

Do you have a question on how to do something.
Ask in here.
Post Reply
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

How to change port labels in controller

Post by Armetas »

Hi,

Maybe it is dummy question, but I cannot find answer.

I have 2 relay box'es through relay hub, how can I change labels of my relay ports (main and second)?

Thanks in advance.

P.s. some relay code:
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port6 );
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to change port labels in controller

Post by rimai »

Add something like this above setup()

Code: Select all

#define NewaPumps Port8
Then you can call it NewaPumps instead of Port8.
Just keep in mind that it cannot have spaces.

Code: Select all

ReefAngel.Relay.On( NewaPumps );
Roberto.
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

Re: How to change port labels in controller

Post by Armetas »

rimai wrote:Add something like this above setup()

Code: Select all

#define NewaPumps Port8
Then you can call it NewaPumps instead of Port8.
Just keep in mind that it cannot have spaces.

Code: Select all

ReefAngel.Relay.On( NewaPumps );
Cool, big thanks
Image
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

Re: How to change port labels in controller

Post by Armetas »

And by the whay will it change labels on RA LCD screen?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to change port labels in controller

Post by rimai »

Roberto.
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

Re: How to change port labels in controller

Post by Armetas »

I've tried like it says with custom labels but it didn't work out, as I have relay expansion - Box1_port1 and etc. I don't know how to set labels there
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to change port labels in controller

Post by rimai »

Try going through the array...
8 should be box1_port1

Sent from my SPH-L710 using Tapatalk
Roberto.
Armetas
Posts: 82
Joined: Sat Mar 29, 2014 1:55 pm

Re: How to change port labels in controller

Post by Armetas »

rimai wrote:Try going through the array...
8 should be box1_port1

Sent from my SPH-L710 using Tapatalk
Yes it worked, but noticed that 10 characters are the limit. Thats why it failed first time for me
Image
Post Reply