Troubleshooting LCD screen

Basic / Standard Reef Angel hardware
Post Reply
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Troubleshooting LCD screen

Post by ahmedess »

Sometimes when i press the push button on the controller i get a blank screen instead of the main display screen and it stays like that until i unplug the controller from power and replug it back in
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Troubleshooting LCD screen

Post by rimai »

Do you have custom main screen?
Roberto.
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Re: Troubleshooting LCD screen

Post by ahmedess »

Yes. It also flikers when its blank like that
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Troubleshooting LCD screen

Post by rimai »

Can I see the code?
Roberto.
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Re: Troubleshooting LCD screen

Post by ahmedess »

Code: Select all

// Autogenerated file by RAGen (v1.2.1.158), (03/12/2012 20:24)
// RA_031212_2024.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayLEDPWM
#define wifi
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 4
#define PWMEXPANSION
#define CUSTOM_MAIN
#define SALINITYEXPANSION
*/


#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <Salinity.h>
#include <ReefAngel.h>

#include <avr/pgmspace.h>
prog_char menu0_label[] PROGMEM = "Feeding";
prog_char menu1_label[] PROGMEM = "Water Change";
prog_char menu2_label[] PROGMEM = "pH calibration";
prog_char menu3_label[] PROGMEM = "Salinity calibration";
PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label  };

void MenuEntry1()
{
	ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
	ReefAngel.WaterChangeModeStart();
}
void MenuEntry3()
{
	ReefAngel.SetupCalibratePH();
        ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry4()
{
        ReefAngel.SetupCalibrateSalinity();
        ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}

void DrawCustomMain()
{
	// the graph is drawn/updated when we exit the main menu &
	// when the parameters are saved
	ReefAngel.LCD.DrawDate(6, 6);
	pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
	ReefAngel.LCD.DrawMonitor(15, 45, ReefAngel.Params, ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
	ReefAngel.LCD.DrawMonitor(15, 45, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
        ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, 15, 75, "SL:");
        ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Salinity, COLOR_BLACK, 35, 75, 10);
	pingSerial();
	byte TempRelay = ReefAngel.Relay.RelayData;
	TempRelay &= ReefAngel.Relay.RelayMaskOff;
	TempRelay |= ReefAngel.Relay.RelayMaskOn;
	ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}

void DrawCustomGraph()
{
	//ReefAngel.LCD.DrawGraph(5, 5);
}


void setup()
{
    ReefAngel.Init();  //Initialize controller
    ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));
    ReefAngel.SetTemperatureUnit(1);  // set to Celsius Temperature

    ReefAngel.FeedingModePorts = Port1Bit | Port8Bit;
    ReefAngel.WaterChangePorts = Port1Bit | Port8Bit;
    ReefAngel.OverheatShutoffPorts = 0;
    ReefAngel.LightsOnPorts = 0;

    // Ports that are always on
    ReefAngel.Relay.On(Port1);
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port7);
}

void loop()
{
    // Specific functions
    ReefAngel.StandardFan(Port2);
    ReefAngel.StandardHeater(Port3);
    ReefAngel.Relay.DelayedOn(Port8, 5);
    ReefAngel.Portal("ahmedess", "xxxxxxx");
    
    ReefAngel.DosingPumpRepeat1(4);
    ReefAngel.DosingPumpRepeat2(5);
   
    
    ReefAngel.PWM.SetActinic(PWMSlope(15,05,23,54,0,InternalMemory.LEDPWMActinic_read(),60,ReefAngel.PWM.GetActinicValue()));
    ReefAngel.PWM.SetDaylight(PWMSlope(15,0,23,59,0,InternalMemory.LEDPWMDaylight_read(),120,ReefAngel.PWM.GetDaylightValue()));
    
    ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Troubleshooting LCD screen

Post by rimai »

I don't see anything wrong except for the Portal() function, which should be just above ReefAngel.ShowInterface();
Roberto.
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Re: Troubleshooting LCD screen

Post by ahmedess »

It doesnt happen all the time but its been happening more often lately
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Troubleshooting LCD screen

Post by rimai »

Was there anything added lately? Equipment change or anything?
Roberto.
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Re: Troubleshooting LCD screen

Post by ahmedess »

No
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Re: Troubleshooting LCD screen

Post by ahmedess »

It also stays lit for longer than the specified LCD timeout
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Troubleshooting LCD screen

Post by rimai »

I can't replicate the problem.
What happens if you remove the jumpers from the head unit?
This will disable your expansion modules, though.


Sent from my SPH-D700 using Tapatalk 2
Roberto.
ahmedess
Posts: 173
Joined: Sun May 22, 2011 2:29 pm

Re: Troubleshooting LCD screen

Post by ahmedess »

I uploaded the code again to the controller after fixing the code as you mentioned and i ll test and see
Post Reply