First post

Post Reply
SaltyGXP
Posts: 24
Joined: Tue Apr 16, 2013 3:25 pm
Location: Ohio

First post

Post 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
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: First post

Post 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
SaltyGXP
Posts: 24
Joined: Tue Apr 16, 2013 3:25 pm
Location: Ohio

Re: First post

Post 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.
Image
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: First post

Post 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
SaltyGXP
Posts: 24
Joined: Tue Apr 16, 2013 3:25 pm
Location: Ohio

Re: First post

Post 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?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: First post

Post by rimai »

Roberto.
SaltyGXP
Posts: 24
Joined: Tue Apr 16, 2013 3:25 pm
Location: Ohio

Re: First post

Post 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.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

First post

Post by lnevo »

Global is where you put variables that are common in setup() and loop() and other functions you may want later.
SaltyGXP
Posts: 24
Joined: Tue Apr 16, 2013 3:25 pm
Location: Ohio

Re: First post

Post 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:
Image
Post Reply