Problem uploading code

Do you have a question on how to do something.
Ask in here.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Problem uploading code

Post by Poiromaniax »

Hey guys,

Ive just updated to v1.0.7 libraries...

trying to upload memory ad getting this error:
Screen Shot 2013-06-12 at 6.21.37 PM.png
Ive tried switching between the two serial ports with no joy
You do not have the required permissions to view the files attached to this post.
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Problem uploading code

Post by rimai »

/dev/cu. is not the correct one.
Make sure you use the tty instead of cu and that you have the cable connected with the black wire all the way to the right?
Roberto.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

Thanks Roberto. That sorted it!

Now, I am getting a sketch too big error. What im trying to do is seperate my memory settings and main screen ino, but it gives me issue. However, when i combine my new memory settings that i would like to use with the main screen ino, i get the error

my combined ino is attached as well as my old main screen ino (with outdated memory settings builtin) and the new memory settings ino
Archive.zip
You do not have the required permissions to view the files attached to this post.
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

You only need to set your memory values once..they are retained. :)
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:You only need to set your memory values once..they are retained. :)
Ok, but take a look at my ino called binder_homescreen.

If you remove all the memory settings from there - the file does not work. tells me im missing classes and such? so cannot upload to the controller with settings stored in internal memory.

unless im looking at this completely wrong? Maybe i can show you what i mean via teamviewer?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

I'll take a look... give me a few :)
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:I'll take a look... give me a few :)
Thanks man
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

I'm not sure what you mean by memory settings. You are not setting any memory settings in any of those INO files. There seem to be very few differences in any of the files.

Can you explain which file you are currently using and which you are trying to use? Also what changes are you looking to make?

I'm looking at getting team viewer...
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:I'm not sure what you mean by memory settings. You are not setting any memory settings in any of those INO files. There seem to be very few differences in any of the files.

Can you explain which file you are currently using and which you are trying to use? Also what changes are you looking to make?

I'm looking at getting team viewer...
Ok so let me try explain.

I am setting up a new tank with a few new pieces of hardware. I was using Metal Halides, but now using T5 and LED - so no need for the startup delay and I want to change the lighting schedule.

I ran through the Reefangel Wizard and set my paramaters etc, uploaded the code and all is well - excpet obviously my Custom main screen isnt there.

So now I go and upload my custom screen code, and bang, my lighting settings have fallen back to the MH schedule with timer delay etc. However, the delay doesnt work. I left my light unit plugged in for about 30-45 min and the port never turned on. I havent managed to check if any of my other settings have changed back, but i assume so (my RF module is now on constant mode as opposed to ReefCrest which i specified in the wizard)

When i look at my Memory_2 file and compare it to my Binder_Homescreen, I am seeing alot of similar fields - Almost like there are two different memory settings battling for supreme position?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

Ok, I think I understand. Let me see what is needed.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

So now I go and upload my custom screen code, and bang, my lighting settings have fallen back to the MH schedule with timer delay etc. However, the delay doesnt work. I left my light unit plugged in for about 30-45 min and the port never turned on. I havent managed to check if any of my other settings have changed back, but i assume so (my RF module is now on constant mode as opposed to ReefCrest which i specified in the wizard)
I think you are misunderstanding something here... You keep saying memory settings because you are using "Memory Settings' In the wizard. The settings that you refer to are not set in the code... they are set in memory! So the code has nothing to do with it.

If the delay is off then it's good. What you need to do now is go to the Portal and change the schedule to what you want. Your code does not specify ANY schedule. As far as the RF, that too is set in the portal because you are using the memory setting on your RA to set that. So just go to the Internal Memory section and change the mode to what you want it to be.

For the lighting you'll want to set the Standard Light schedule fields now that you've defined the ports as Daylights.

Please check that out and report back, I don't think we need to touch the code. The code looks great.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:
So now I go and upload my custom screen code, and bang, my lighting settings have fallen back to the MH schedule with timer delay etc. However, the delay doesnt work. I left my light unit plugged in for about 30-45 min and the port never turned on. I havent managed to check if any of my other settings have changed back, but i assume so (my RF module is now on constant mode as opposed to ReefCrest which i specified in the wizard)
I think you are misunderstanding something here... You keep saying memory settings because you are using "Memory Settings' In the wizard. The settings that you refer to are not set in the code... they are set in memory! So the code has nothing to do with it.

If the delay is off then it's good. What you need to do now is go to the Portal and change the schedule to what you want. Your code does not specify ANY schedule. As far as the RF, that too is set in the portal because you are using the memory setting on your RA to set that. So just go to the Internal Memory section and change the mode to what you want it to be.

For the lighting you'll want to set the Standard Light schedule fields now that you've defined the ports as Daylights.

Please check that out and report back, I don't think we need to touch the code. The code looks great.
Thanks dude, I will try it - I was having issues earlier where my wifi wasnt included, but i think i sorted that out.

However, after uploading my custom main, the delay seems to be on, even though it shouldnt be defined in that code??
Ill take a look and let you know :)
Image
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

@lnevo

from fiddling around on the portal, it looks like i can change exactly what i need, you frikking rock dude!!!!!

I do have one question - on the portal under internal memory there is an option for delayed start. I see it says "delayed start" for water change mode/feed mode and power cycle.

What does this option do? i get the feed mode delay, but what of the waterchange mode and power cycle? Its kinda confusing me as I already turned off the delay for my lights under "Time Schedule"?

Is this "delayed start" setting going to delay all my devices for x amount of time if there is a power failure etc?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

That feature is more for Skimmers and things where you want them to wait a few minutes before starting after waterchange and feeding mode. You aren't using any of that in your code and it has nothing to do with the lighting schedule.

You need to use ReefAngel.Relay.DelayedOn(Port); for that to work.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:That feature is more for Skimmers and things where you want them to wait a few minutes before starting after waterchange and feeding mode. You aren't using any of that in your code and it has nothing to do with the lighting schedule.

You need to use ReefAngel.Relay.DelayedOn(Port); for that to work.
Ah, ok - I see now!

Thanks for clearing that up :)

For some reason, my two daylight ports have both been on since last night (im in South Africa) - In internal memory they are only set to turn on at 12:30pm?
Image
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

I did use the "Set date and time" feature on the portal, maybe that messed it up?
Image
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

And lastly, I want to now change which ports are used for what.

E.G - my heaters were on ports 3&4. I want to combine them both into Port 3 and use Port 4 for ATO pump.

How would i go about this without running the Wizard again? surely can be done through internal memory? or the code itself?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

Just change the code. Much easier.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

Btw it looks like your code did that already...
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:Btw it looks like your code did that already...
You mean it's already changed the ports?

Where I'm getting confused is how do I add the ATO function to port 4? Changing the heaters to one port isn't that bad.....
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

You did already...

ReefAngel.StandardHeater( Port3 );
ReefAngel.StandardATO( Port4 );
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

Sorry if im being a pain, Ive never been great at coding so im not sure if ive made a big boo boo here or not :(

But im so confused...

In my main screen code i have this:

Code: Select all

    // Ports that are always on
    ReefAngel.Relay.On(Port5);
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port7);
    ReefAngel.Relay.On(Port8);
    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.MHLights(Port1);
    ReefAngel.MHLights(Port2);
    ReefAngel.StandardHeater(Port3);
    ReefAngel.StandardHeater(Port4);
in the memory file it has as you say.....

but now my main issue is that the Timer function isnt working for my daylights (port 1 and 2) - Do you think ive messed it all up and should set RA back to defaults and start again?
Last edited by Poiromaniax on Thu Jun 13, 2013 6:23 am, edited 1 time in total.
Image
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

I may have fixed it - have to upload and see.

I changed the above code to this:

Code: Select all

 // Ports that are always on
    ReefAngel.Relay.On(Port5);
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port7);
    ReefAngel.Relay.On(Port8);
    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.DayLights( Port1 );
    ReefAngel.DayLights( Port2 );
    ReefAngel.StandardHeater( Port3 );
    ReefAngel.StandardATO( Port4 );
    ////// Place your custom code below here
Why are these two so different?
Screen Shot 2013-06-13 at 3.20.24 PM.png
You do not have the required permissions to view the files attached to this post.
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

Your first post is the older code... the second post shows the newer code with the ports setup the way I believe you want them.

The files aren't different int he code that you are showing, except the older file is defining all the feedingmode and waterchange ports etc. You can copy all the lines after ReefAngel.SetTemperatureUnit and // Ports that are always on into your current code.... the one with Daylights, not MHLights.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

Moving forward, get rid of the old files. Stop using them, stop referring to them (except for copying those last bits that I pointed out above) If you load the old files then you are reverting to your old setup. Just use one file from this point on. Also it's an INO or PDE not a memory file.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:Moving forward, get rid of the old files. Stop using them, stop referring to them (except for copying those last bits that I pointed out above) If you load the old files then you are reverting to your old setup. Just use one file from this point on. Also it's an INO or PDE not a memory file.

Thanks, the one on the left (binder_homescreen) is the one i want to use (and am using)

Im not gonna touch the wizard again. I think its all sorted now - I just have to make sure that my lights turn off and on according to schedule. Ill report back tomorrow or sat.

Thanks so much for all your help and patience :D
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

Sounds good. the settings for the light ports as we discussed should all be in done in the Internal Memory section on the portal
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

lnevo wrote:Sounds good. the settings for the light ports as we discussed should all be in done in the Internal Memory section on the portal
I did that yesterday.
I just dont think the function was in my code to link to internal memory

Will see soon, hopefully ive fixed that
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Problem uploading code

Post by lnevo »

It was :)

All your files are using the internal memory. The big change was that you went from using the MH schedule to the standard light schedule. And MH lights also have the delay option added.

If you weren't linked to memory then you'd have seen the times listed in the code.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Problem uploading code

Post by Poiromaniax »

So would the MH schedule affect the timing like that?

Yesterday the ports were either on or off. It never triggered the ports when the scheduled time came
Image
Post Reply