Page 1 of 1

New section for code bits?

Posted: Thu Jun 13, 2013 7:27 am
by cosmith71
There is a wealth of knowledge here, but it's scattered all over.

How about a new section, where each post is a single piece of code for solving a problem? No discussion (can be put somewhere else). That way things would be easy to search.

Something like this.
Turn Lights Down on Overheat

This will dim your LED's when the temperature hits 83 and return them to normal when the temperature drops below 80. Put it in the loop section.

Code: Select all

// Lights down on overheat
    static boolean overheat=false;
    if (ReefAngel.Params.Temp[T1_PROBE] >= 830) overheat=true;
    if (ReefAngel.Params.Temp[T1_PROBE] <= 800) overheat=false;
    if (overheat)
    {
      ReefAngel.PWM.SetActinic(15);
      ReefAngel.PWM.SetDaylight(15);
    }

Any thoughts?

--Colin

Re: New section for code bits?

Posted: Thu Jun 13, 2013 8:17 am
by lnevo
I have been thinking about this for a while. This is exactly what the wiki should be used for.

That's why I asked if someone could make a nice outline for the different topics we could put code snippets in there and have them organized nicely.

http://forum.reefangel.com/wiki

Re: New section for code bits?

Posted: Thu Jun 13, 2013 8:28 am
by rimai
I like it :)
Yes, you can use the wiki: http://forum.reefangel.com/wiki

Re: New section for code bits?

Posted: Thu Jun 13, 2013 8:36 am
by lnevo
I'm not a big wiki user, but if someone wants to make the sections, etc it would be pretty straight forward to filling in the snippets. I know there's like 5 ways to do ATO :) and 100 ways to do Feeding Modes, etc. :) I just need a structure to follow :)