Updating Code / Testing on live reef

Do you have a question on how to do something.
Ask in here.
Post Reply
chrome
Posts: 27
Joined: Thu May 26, 2011 6:28 am

Updating Code / Testing on live reef

Post by chrome »

Didn't know where to post this, so I figured this would be the best spot.

How does everyone update their controller code when its already on an established tank and all the hardware is already mounted in a good spot.

Do you rip out all your hardware, go to your computer and upload new code? You have to tote it back to your tank just to test it? What if it don't work.. back to your computer to run new code and in the meantime your tank is offline. I would think that running code on a live tank flips all relays off each time, so that can't be good on your pumps.

There has got to be a better way of doing this, that doesn't require a laptop. Do all other controllers on the market require computers next to the controller to program? Do they automatically flip relays off when updating code?
Ace25
Posts: 20
Joined: Sat May 21, 2011 10:22 am
Location: Lompoc, California

Re: Updating Code / Testing on live reef

Post by Ace25 »

Really long USB extension cable (I got a 32' from newegg for $17) or Wifi (I think, haven't played with Wifi beyond just setting it up so not sure if you can update code over Wifi, someone else that knows that answer can hopefully chime in). Since my controller is sitting next to me still, 7 months after I bought it, I can't speak about how updating works when it is "in use".
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Updating Code / Testing on live reef

Post by alexwbush »

I have my server plugged into mine now. When I used wifi, I used my laptop to upload.

I think Roberto is working on something to allow uploads via wifi, but it is not yet available. I also think Dave was working on something to program via the client.
chrome
Posts: 27
Joined: Thu May 26, 2011 6:28 am

Re: Updating Code / Testing on live reef

Post by chrome »

Thanks for the suggestions. I think I'll go with the USB extension.

Alex I think the wifi will only allow uploads for internal memory values when its done.

Thanks for the help!
NanoTrevor
Posts: 69
Joined: Thu Jun 02, 2011 1:58 pm

Re: Updating Code / Testing on live reef

Post by NanoTrevor »

check monoprice.com for the usb extension cable should be cheaper than newegg

just buy a couple of these for 30ft.http://www.monoprice.com/products/produ ... 1&format=2
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Updating Code / Testing on live reef

Post by rimai »

At one point in the wifi developement, I was able to get upload of code through wifi.
It was very confusing and impractical to have it done by anyone, so I just never made it as a feature of the wifi.
I just can't seem to be able to get it going again.
I do know that the wifi board would have to be modded to get it working.
Roberto.
Ace25
Posts: 20
Joined: Sat May 21, 2011 10:22 am
Location: Lompoc, California

Re: Updating Code / Testing on live reef

Post by Ace25 »

Good suggestion on monoprice, they have a 32' for $8.93, 49' for $15.39, 65ft for $20.23, and 82' for $30.43

rimai, that seems like one of the most important reasons to have Wifi to me, to be able to update code, change settings, and get status updates. Actually, I was kind of relying on it to be able to update code for a project I want to do with it (which is get weather updates and update the lighting code to run weather patterns "real time" so to speak).
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Updating Code / Testing on live reef

Post by alexwbush »

are you building weather code to manipulate LEDs?
Ace25
Posts: 20
Joined: Sat May 21, 2011 10:22 am
Location: Lompoc, California

Re: Updating Code / Testing on live reef

Post by Ace25 »

Yes, I want to have a bunch of different weather settings for PWM signals on my LEDs with different effects. I want to write an program that polls the weather from anywhere in the world (Great Barrier Reef, Fiji, PNG, but it doesn't matter where you pick), just put in the location you want to poll weather from, then you can offset the time to mimic the weather on your tank. Say your day starts at 1pm-11pm on your tank, you can tell the software to mimic what the weather was like at 9am-7pm on the Great Barrier Reef on the same day (unless the time zone is ahead of you/your offset, then it will use the previous days weather log). Every 15 minutes it takes a reading of the weather and logs it, log can be as simple as a time stamp, offset number, and 2 digit number representing the PWM setting.

So I was hoping I could somehow change the running lighting program on the reef angel over the wifi with a program that runs on the PC. It really doesn't matter which direction it starts from, wifi sends request for weather update, or program pushes program over network, I just hope it is possible to do.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Updating Code / Testing on live reef

Post by binder »

Ace25 wrote:Yes, I want to have a bunch of different weather settings for PWM signals on my LEDs with different effects. I want to write an program that polls the weather from anywhere in the world (Great Barrier Reef, Fiji, PNG, but it doesn't matter where you pick), just put in the location you want to poll weather from, then you can offset the time to mimic the weather on your tank. Say your day starts at 1pm-11pm on your tank, you can tell the software to mimic what the weather was like at 9am-7pm on the Great Barrier Reef on the same day (unless the time zone is ahead of you/your offset, then it will use the previous days weather log). Every 15 minutes it takes a reading of the weather and logs it, log can be as simple as a time stamp, offset number, and 2 digit number representing the PWM setting.

So I was hoping I could somehow change the running lighting program on the reef angel over the wifi with a program that runs on the PC. It really doesn't matter which direction it starts from, wifi sends request for weather update, or program pushes program over network, I just hope it is possible to do.
You won't need to update the software on the controller via wifi from the sounds of your project. It just seems like you would need to be able to update the PWM percentage and change the PWM mode to storm, etc. I know right now you are able to update your PWM percentages via the wifi interface. You just have to send it the command and it will reply back OK if it was a success. (The OK will be in an XML string.) As for the PWM Expander to set the PWM mode (storm or whatever), that ability does not exist via wifi but could very easily exist. I would just need to add the expander code to the libraries and set up a wifi command to allow it to be updated/changed via the wifi interface.

I believe I have a copy of the PWM expander code with a handful of menu entries. I'll work on adding that into the libraries then.

curt
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Updating Code / Testing on live reef

Post by rimai »

I think Dave's Client could very well implement this. I don't think it's very difficult.
Can you create a new thread where we can discuss and put thoughts together?
Roberto.
dmolton
Posts: 182
Joined: Tue Mar 22, 2011 11:08 am

Re: Updating Code / Testing on live reef

Post by dmolton »

rimai wrote:I think Dave's Client could very well implement this. I don't think it's very difficult.
Can you create a new thread where we can discuss and put thoughts together?
Yeah, definitely. This would be pretty easy to implement, I think. Now would be a good time to get it worked out since I just finished reading memory values from the controller and today, planned on starting writing updated ones back to the controller. Might as well hook up some PWM weather values and send those back while we're at it :)
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Updating Code / Testing on live reef

Post by alexwbush »

dmolton wrote:
rimai wrote:I think Dave's Client could very well implement this. I don't think it's very difficult.
Can you create a new thread where we can discuss and put thoughts together?
Yeah, definitely. This would be pretty easy to implement, I think. Now would be a good time to get it worked out since I just finished reading memory values from the controller and today, planned on starting writing updated ones back to the controller. Might as well hook up some PWM weather values and send those back while we're at it :)
and clouds/lightning would be awesome too! Maybe also as an option you could "build" your weather to a certain degree. That way if I still wanted normal light 80% of the time and maybe clouds 20%, I could make it happen. I am also working on programming this in my pde, but if the client could do that, even better! Here's my other thread: http://forum.reefangel.com/viewtopic.php?f=12&t=117
Post Reply