how do I read?

Do you have a question on how to do something.
Ask in here.
Post Reply
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

how do I read?

Post by rossbryant1956 »

In my code (lee's adapted) I have the following lines:

Code: Select all

InternalMemory.write(Mem_B_SwabbieRepeat,6);  
InternalMemory.write(Mem_B_SwabbieTime,1);  
and its called here:

Code: Select all

int repeat=InternalMemory.read(Mem_B_SwabbieRepeat)*60;
int runtime=InternalMemory.read(Mem_B_SwabbieTime)*60;
Questions:

1. What does the 6 in mem...repeat mean? Every 6 hours? 6 minutes?
2. What about mem...time? Run 1 second?
3. So in the code when mem...repeat is times 60 = 360 minutes or every 6 hours?
4. Finally in mem...time is times 60 =60 seconds or something else/

I'd like my swabbie to run probably every 6 hours for about 5 minutes. The code may be working perfectly but I never see it in the portal because of the short durations. Thx in advance
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: how do I read?

Post by lnevo »

Its for every 6 hours for 1 minute (avast marines recommendations)

You need to make sure the memory is initialized if you are using the code i have for init_memory its only going to run once IF you set the reset memory flag...
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: how do I read?

Post by rossbryant1956 »

here is what I have:

Code: Select all

InternalMemory.write(Mem_B_ResetMemory,false);
What does "initialized" mean? I can see the values when I do the /mb command
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: how do I read?

Post by lnevo »

Thats fine...you said you had modified my code. You dont need to write mem all the time...once its written it stays written. I had an init_memory function that did the write only once or when needed...
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: how do I read?

Post by rossbryant1956 »

Lee, just a quick note to say thx for all your help. I changed my swabbie time in memory to something crazy so I could see it fire in the portal and its working beautifully. The Skimmer, Skimmate, and power code is working as well.

I am still having trouble with some of my if, then's but I'll get back to that in the coming weeks. Again, thx for all your help.

Roscoe
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: how do I read?

Post by lnevo »

No problem. keep 'em coming...
Post Reply