Page 1 of 1

RAgen PDE... help

Posted: Sat Jan 07, 2012 3:39 pm
by rufessor
Hi All-

So I started thinking I would get this pretty quick and the more I play the less I get. I am now down to just using RAGen in attempt to get SOMETHING that will work for me other than the simple.pde. So. If you look at BindersReefAngel_Features.H file the complete commented version it says this


/*
PWM Expansion Device

This next line will allow the enabling of the PWM Expansion Device. It will add a menu entry that displays
"PWM ->". It will give the preset defaults for the expansion device.
The menu entries will be:

Slow Cloud
Fast Cloud
T-storm 1
T-storm 2
0%
50%
100%
Custom

Approximately 630 bytes to have this feature
*/
#define PWMEXPANSION

But I have made about 5 different RAgen PDEs with LED etc and I have never seen any menu item indicating anything about any LED in any way. I only EVER get a menu that contains

feeding
waterchange
ATO clear
OverHeat Clear
pH Cal
Date/Time
Version
Exit

Can someone help, ALL I WANT to do is get a PDE that will let me power my LEDs, at this point I could care less about clouds etc... for now. I still have this feeling that somehow I am missing something about the RAGen files...
Mine is here

Code: Select all

// Autogenerated file by RAGen (v1.1.0.126), (01/07/2012 15:37)
// RA_010712_1537.pde
//
// This version designed for v0.8.5 Beta 17 or later

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define StandardLightSetup
#define SaveRelayState
#define PWMEXPANSION
*/


#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

    // Ports that are always on
    ReefAngel.Relay.On(Port8);
}

void loop()
{
    // Specific functions
    ReefAngel.StandardATO(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.Wavemaker1(Port4);
    ReefAngel.Wavemaker2(Port5);
    ReefAngel.StandardFan(Port6);
    ReefAngel.StandardHeater(Port7);

	ReefAngel.ShowInterface();
}

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 3:44 pm
by rufessor
Oh... I have Binders feature.h file in the correct place (docs/arduino/libraries/ReefAngel_Features)
I tried editing the file to include the PWM stuff but I dont think that matters since I have seen a post that RAgen changes that file each time, but strangely I dont see the file change for me... could it be that I have a fundamental issue thats just killing me with directory and file locations? Seems not... but I am sure this will be easy for the pros! Sorry to be SUCH a PITA> really... trying to get this.

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 3:51 pm
by rimai
Can you check if the folders are setup properly on RAGen?
Go to menu Edit -> Settings:
Sketch: Documents\Arduino
Libraries: Documents\Arduino\libraries
Arduino: C:\Program Files\Reef Angel Controller

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 4:19 pm
by binder
If SIMPLE_MENU or CUSTOM_MENU is enabled, the PWM menu is NOT displayed.

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 4:20 pm
by rufessor
Mine are about 1/2 wrong... I wonder if this is why

I have had this issue from the beginning.. RAgen installer never works for me so I have always used the executable and replaced it with the version the installer makes afer the install package runs...

So.. I run the installer package, try to execute RAgen and it always fails. So, I went to GitHub and grabbed Curts executable (latest version) that he has there for such cases, and I download and overwrite the RAgen app the installer made with the one I jsut described, so I bet its because of this.

My pref file was set up as....
Sketch: \\psf\Home\Documents\Arduino
Libraries: \Program Files\Reef Angel Controller\libraries
Arduino: \Program Files\Reef Angel Controller

I think the first is an equivelant path to what you wanted, the Libraries and Arduino are not. I will change it to see if this helps.

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 4:23 pm
by rufessor
Ok... looking into that, I dont remember selecting them but I may have had it selected as when I went back to look at RAgen simple was clicked....


Is it true that the ReefAngel_Features.h file is remade when I use RAgen, i.e. I should never have to worry. The reason I got into that file was because I was trying to use some posted PDEs and a few people had run into issues with that file in memory limits so I was just playing with recommends that had been made... mostly to learn but I want to be sure its ok.

I made the changes suggested by both you guys and am uploading now... will post soon

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 4:31 pm
by rufessor
OH MY... THANKS SO MUCH>
Its fine... now I will wire up the lights and give this a true test!
Unsure what fixed it but its working now.

Now I can start with something I KNOW works on my system and break it myself to learn! THANKS again.

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 4:37 pm
by rufessor
binder wrote:If SIMPLE_MENU or CUSTOM_MENU is enabled, the PWM menu is NOT displayed.

So I looked at the PDE I posted and I did not see that I had Simple_menu or Custom_menu, or am I missing it. Could it have been in the features.h file that I had... since the preferences were wrong I am betting that RAGen created a perfectly good features.h file but in the wrong place and the compiler was getting a features.h file that never changed and was incompatible...

I.e. if I use RAGen do I ever have to worry about the features.h file... or only when I start out on my own. I see it as the first #Include statement so its obvious that this is where the compiler is getting its information, and the annotated file is SUPER helpful... so I like having it around, but its also obvious that RAgen MUST be remaking this each time...

Information would help to understand completely whats happening

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 4:57 pm
by binder
Yes, RAGen recreates the file when you generate a PDE. It creates it based on the Features you have selected on the Features tab. This is to ensure that the code you generate will work as desired.

If you start tweaking things on your own (ie, manually editing the PDE file to get additional functionality), then you may have to modify the Features file by hand. If you do this, then go back and have RAGen create a PDE file for you, it can possibly overwrite your changes. My suggestion is to limit modifying the Features file unless you need to modify it. That is until you really feel comfortable and get the hang of it.

RAGen is great for getting the basics working and giving you a nice, clean PDE file to start working with. The additional modifications that you can make are great, but beyond the scope of what RAGen can do (for now).

The fully documented Features file will always be listed on my github account. I try to keep it as complete as I possibly can. Most of the comments about each feature are also displayed on the Features tab inside RAGen except for the newer features. RAGen does not get updated as often and sometimes the libraries get newer features that RAGen does not know about which is why there can be things missing from RAGen. It's not perfect but it provides a great starting point for the basics.

Re: RAgen PDE... help

Posted: Sat Jan 07, 2012 9:14 pm
by rufessor
I completely agree that it provides a great starting point for the basics, if I had any argument at all is that its to easy and hides so much its confusing trying to go from push button to something I create, which is why I have so many questions, some are probably obvious if your used to this kinda structure, but its new to me. Thank you very very much for this explanation, It goes a LONG ways towards getting a handle on how things work together. As for the features.h file that you fully comented, I found it super useful and learned a lot about what RAgen is doing by reading it. Now I guess I need to begin digging into wheverver the code is that RAgen references in compile to creat the menus and get input say for PWM LED percentage out to the PWM control box or any number of other things ... some less complex, taht I dont quite get. Thanks a lot for your response. Its been very helpful asside from the immediate solution to my inability to get a working PDE, which is well solved.