Page 1 of 1

First post

Posted: Sat Apr 27, 2013 2:08 pm
by SaltyGXP
Hey everyone. I'm the new guy here. Just ordered my RA+ yesterday. I know there is tons on info on here for coding and all but has anyone made an in depth video on coding? I'm the kind of guy that can read and read and still not get it lol. I'm more of a visual and hands on kinda guy. At some point I'd like to build my own led fixture and programm the RA to control it. I also have 2 jebao WP-40's I'd like to program them with vortech wave patterns. I know all the info is there but I want to be able to understand it not just copy and past it.

Thanks
Dustin

Re: First post

Posted: Sat Apr 27, 2013 6:06 pm
by cosmith71
The best thing to do is take the code that's here, print it out and type it in yourself. Figure out what each line does and add a comment to the line explaining it. After a while you'll have it down.

--Colin

Re: First post

Posted: Sun Apr 28, 2013 6:54 am
by SaltyGXP
cosmith71 wrote:The best thing to do is take the code that's here, print it out and type it in yourself. Figure out what each line does and add a comment to the line explaining it. After a while you'll have it down.

--Colin
Simple yet effective I like it. Did't even think about doing it that way :mrgreen: . Thank you sir.

Re: First post

Posted: Sun Apr 28, 2013 7:16 am
by cosmith71
You're welcome! That's how I learned BASIC some 30 years ago. :geek:

If you want to get more into the Arduino (Reef Angel is based on Arduino) side of things and learn more about programming, Radio Shack has a nice Arduino kit:

http://www.radioshack.com/product/index ... cale=en_US

It's a little pricey but has lots of stuff and is a great introduction to Aruduino and can definitely help you learn the basics of programing.

--Colin

Re: First post

Posted: Sun Apr 28, 2013 10:07 am
by SaltyGXP
Ok so I understand this and why it works

ReefAngel.PWM.SetActinic(TunzeLongPulse(30, 60, 4, true));
ReefAngel.PWM.SetDaylight(TunzeLongPulse(30, 60, 4, true));

the code states there are two pumps in sync with each other going for 30%-60% and taking 4 seconds to do so. What I don't get is the sections like global, void setup, and void loop what dictates code being placed in these sections?

Re: First post

Posted: Sun Apr 28, 2013 10:11 am
by rimai

Re: First post

Posted: Sun Apr 28, 2013 11:16 am
by SaltyGXP
Thanks Roberto. Ok so VOID SETUP means the start of the setup code and VOID LOOP means the start of the loop code. And global is stuff you want displayed on the RA screen? I'm feeling 1000% better about this already. I feel like a damn kid lol. Ive never in my life been on a forum where people didn't flame you for asking questions that have been covered 1000 times over. I look forward to chatting and leading with the rest of you.

First post

Posted: Sun Apr 28, 2013 11:45 am
by lnevo
Global is where you put variables that are common in setup() and loop() and other functions you may want later.

Re: First post

Posted: Sun Apr 28, 2013 12:31 pm
by SaltyGXP
lnevo wrote:Global is where you put variables that are common in setup() and loop() and other functions you may want later.
Ahhhh.....thats why it says #include. I'm goning to have this coding stuff down by the end of the week. I kidd I kidd lol :lol: