Power Cycling for WIFI

New members questions
Post Reply
mineman@mac.com
Posts: 43
Joined: Mon Jan 30, 2012 10:02 pm

Power Cycling for WIFI

Post by mineman@mac.com »

I keep loosing connection from my iPhone app every night until I power cycle the controller; then everything works great for 24 hours. I tried everything in this thread http://forum.reefangel.com/viewtopic.ph ... wifi#p4708 to the best of my ability but no dice (keep in mind that I am BARELY beginning to understand this thing) :?. This is the code I am using

Code: Select all

#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

void setup()
{
  ReefAngel.Init();  //Initialize controller
}

void loop()
{
  ReefAngel.SingleATOLow(Port1);
  ReefAngel.StandardLights(Port2,14,30,20,30); // Turn Port 2 on at 14:30 and off at 20:30
  ReefAngel.StandardLights(Port3,14,0,21,0); // Turn Port 3 on at 14:00 and off at 21:00
  ReefAngel.StandardLights(Port4,13,30,21,30); // Turn Port 4 on at 14:00 and off at 21:00
  ReefAngel.Wavemaker1(Port5);
  ReefAngel.Wavemaker2(Port6);
  ReefAngel.StandardHeater(Port7);
  if (now()%43200<6) ReefAngel.Relay.On(Port8); 
  else ReefAngel.Relay.Off(Port8); 
  // You can only increment the dosing in seconds
  // 43200 the frequency in seconds that the dosing pump will be activated. 24hrs= 86400s, 12hrs= 43200s
  // 6 is the number of seconds that the dosing pump will stay on.
  if (bitRead(ReefAngel.Relay.RelayData,3)==0)
  {
    ReefAngel.PWM.SetActinic(MoonPhase());
    ReefAngel.PWM.SetDaylight(MoonPhase());
  }
  ReefAngel.ShowInterface();
}
Any help would be appreciated!
Image
wolfador
Posts: 241
Joined: Sun Sep 04, 2011 9:59 am
Location: Pittsburgh, PA

Re: Power Cycling for WIFI

Post by wolfador »

What are the lights on the wifi adapter doing when you are unable to connect? I have had it stop working a time or two where the amber light stayed light, however just unplugging / replugging the wifi adapter back in fixed it.
John
ReefAngel and ReefAngel-HD developer
If the RA iOS app has helped please consider a donation
Image
Post Reply