Code Pull?

Do you have a question on how to do something.
Ask in here.
Post Reply
Thavngr98
Posts: 83
Joined: Sun Jul 29, 2012 6:47 pm
Location: Long Island, NY

Code Pull?

Post by Thavngr98 »

My HD crashed that had my configs backed up. Before I go unhook the RA unit will I be able to connect it to Arduino and pull the code that I am currently running on it or am I SOL and going through the pain of customizing the code again?
-Dave

Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Code Pull?

Post by lnevo »

Sol.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Code Pull?

Post by lnevo »

But we can help you salvage it..
Thavngr98
Posts: 83
Joined: Sun Jul 29, 2012 6:47 pm
Location: Long Island, NY

Re: Code Pull?

Post by Thavngr98 »

Lee what can be salvaged? I think I got some of it back from old posts where I posted my code. LOL
-Dave

Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Code Pull?

Post by lnevo »

That and you tell what your missing and we help you rewrite it ;)

This is also why i keep my ino thread up to date :)
Thavngr98
Posts: 83
Joined: Sun Jul 29, 2012 6:47 pm
Location: Long Island, NY

Code Pull?

Post by Thavngr98 »

Good idea! Thanks. I'm off tomorrow. I'm going to work on it then. If I need any help I'll post. Thanks!
-Dave

Image
Thavngr98
Posts: 83
Joined: Sun Jul 29, 2012 6:47 pm
Location: Long Island, NY

Re: Code Pull?

Post by Thavngr98 »

Lee or Whom ever

If I want to turn port 4 on at 13:00 and off at 14:30
and then
turn port 4 back on at 21:30 pm and off 23:00

what would the code be?
-Dave

Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code Pull?

Post by rimai »

Try this:

Code: Select all

if (hour()<17)
ReefAngel.StandardLights(Port4,13,0,14,30);
else
ReefAngel.StandardLights(Port4,21,30,23,00);
Roberto.
Thavngr98
Posts: 83
Joined: Sun Jul 29, 2012 6:47 pm
Location: Long Island, NY

Re: Code Pull?

Post by Thavngr98 »

Do I need to seperate it from my feeding code?

Code: Select all

if(hour()==7 && minute()==55 && second()==0) ReefAngel.FeedingModeStart();
    if(hour()==18 && minute()==55 && second()==0) ReefAngel.FeedingModeStart();
    if (hour()<17)
    ReefAngel.StandardLights(Port4,13,0,14,30);
    else
    ReefAngel.StandardLights(Port4,21,30,23,00);
-Dave

Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code Pull?

Post by rimai »

The code you posted should work.
Roberto.
Thavngr98
Posts: 83
Joined: Sun Jul 29, 2012 6:47 pm
Location: Long Island, NY

Re: Code Pull?

Post by Thavngr98 »

ok thanks!
-Dave

Image
Post Reply