ReefAngel.StandardLights(Port7) not working

Related to the development libraries, released by Curt Binder
Post Reply
Sebyte

Re: ReefAngel.StandardLights(Port7) not working

Post by Sebyte »

No, I need to turn it on 30 minutes after the ATO available period is over. That would be:-

01:30 to 2:00, 05:30 to 06:00, 09:30 to 10:00, 13:30 to 14:00, 17:30 to 18:00, 21:30 to 220:00.

That will leave two hours for the Kalk to settle before I pump RO/DI water through the reactor and in to the tank as required by the ATO.

I know that this is a bit out of the ordinary, and if I had a spare relay port it would be straight forward. I plan to get a second relay box, but my next major purchase will be replacing my T5's with LED's. In the mean time I can use the PWM 5v max output from ATO Hi to switch an electronic relay and control the Kalk mixer in the reactor.

I hope this makes things clearer.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ReefAngel.StandardLights(Port7) not working

Post by rimai »

Let's try this:

Code: Select all

  if (hour() % 4 == 1 && minute()>30)
  {
    digitalWrite(highATOPin,HIGH) // Turn on SSR
  }
  else
  {
    digitalWrite(highATOPin,LOW) // Turn on SSR
  }
Roberto.
Sebyte

Re: ReefAngel.StandardLights(Port7) not working

Post by Sebyte »

Thanks for the code Roberto. Unfortunately it did not work. The time section was correct and produced the correct on/off time. I was not sure of the syntax for a 'AND' function when I was trying to code this myself. I have now had a look at the Arduino site and found their reference section, that will help me lots in the future.

I played around and found that this code worked and gave me the output on ATO Hi.

Code: Select all

// Kalk Reactor available 6 times per day - 01:30 to 2:00, 05:30 to 06:00, 09:30 to 10:00, 13:30 to 14:00, 17:30 to 18:00, 21:30 to 220:00.

  if (hour() % 4 == 1 && minute()>30) 
  {
    pinMode(highATOPin,OUTPUT);
    digitalWrite(highATOPin,HIGH); // Turn on Solid State Relay
  }
  else
  {
    pinMode(highATOPin,OUTPUT);
    digitalWrite(highATOPin,LOW); // Turn off Solid State Relay
  } 
All I needed to add was, pinMode(highATOPin,OUTPUT)

Again thanks for your help.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ReefAngel.StandardLights(Port7) not working

Post by rimai »

Awesome :mrgreen:
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: ReefAngel.StandardLights(Port7) not working

Post by binder »

Sebyte wrote: I have an observation and this is not a criticism, as a new user, I am finding it difficult to find and remember where all of the version notes are (re above on changing temp sensor). Would it be possible if all the version notes were placed in one location and not in a topic area that can be posted into as they seem to me to get lost. Or maybe there is such a place and I have not yet found it :roll:
As per your request, here's a complete changelog of my branch of code. It's rather long but it's a complete list of all the changes that I've made (all my commit notes). I've made the topic Sticky and locked so nobody can post to it thus keeping it "clutter free". :)

http://forum.reefangel.com/viewtopic.php?f=7&t=448

curt
Sebyte

Re: ReefAngel.StandardLights(Port7) not working

Post by Sebyte »

Just the job Curt!

I did make a similar comment to Roberto. I gues he must have some database because he often answers questions with a one line answere like-

http://forum.reefangel.com/viewtopic.ph ... date#p1809

That is a long string to type out and he must cut and paste from a listing. If so it would be the basis for a wiki?

Thanks again,
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ReefAngel.StandardLights(Port7) not working

Post by rimai »

Yes, I do cut and paste.
But actually, all I did was search for the words "wifi" and "date"
If you look at the link I gave you, both words will be highlighted :)
Roberto.
Sebyte

Re: ReefAngel.StandardLights(Port7) not working

Post by Sebyte »

Point taken Roberto :P

My concern is that there is so much info in the forum that newbies, (with or without a programming background), will find the forum search facility limited. Basically because everyone uses different terminology to describe their issue/problem/tip/ etc. etc.

Also as time goes on the amount of info/knowledge will increase exponentially. In the past before I retired I managed IT support teams, and this was a major issue, specially when a new support person joined a team. The only way we could deal with it was to create knowledge bases for the use of the team, and made a subset available top our client base. I acknowledge that this takes time and is labour intensive (that's why I had staff :lol: )

Might I suggest that as a start there are a number of excellent "how to" posts, such as your Sunrise and Sunset effect with your PWM Expansion Module", that could be collated together as Locked Stickies in a new section of the forum perhaps called Reference Library.

If you need a resource to do this I am willing to have a look at it, but would need access rights etc. If you would like to take this further then please PM.

I believe strongly in the RA system as a leading edge product. Also as a past executive member of the Marine Society of Toronto I am promoting RA at every opportunity, and I am slowly getting members who were looking at off the shelf controllers interested in RA, evangelism!

Regards
Post Reply