v0.9.0 Libraries
Posted: Mon Feb 13, 2012 8:30 pm
Following with Roberto's post earlier, the latest version of the development libraries (v0.9.0) have also been released.
This is a significant release and your existing sketches will need to be updated to work.
We have made drastic changes to handle all the new and upcoming features and modules for the controller.
The most notable change is the name of the libraries. They have changed. RAGen handles the conversion and change for you, but for those who are manually changing a sketch file, here's a list of the headers that need to be changed:
Another notable change is the filename for the code. It was PDE and with the use of Arduino 1.0, that was changed to INO. These libraries will ONLY work with Arduino 1.0. So you must upgrade Arduino. It's recommended that you use the installer that Roberto has provided (makes things so much easier).
http://forum.reefangel.com/viewtopic.php?f=8&t=718
Changes to the libraries.
These are just the highlights that are significant for people. There have been many other behind-the-scenes fixups and improvements plus modifications for some of the future products.
These were just some of the major highlights with the library release.
This is a significant release and your existing sketches will need to be updated to work.
We have made drastic changes to handle all the new and upcoming features and modules for the controller.
The most notable change is the name of the libraries. They have changed. RAGen handles the conversion and change for you, but for those who are manually changing a sketch file, here's a list of the headers that need to be changed:
- ReefAngel_AI --> AI
- ReefAngel_Globals --> Globals
- IO (New)
- ReefAngel_EEPROM --> InternalEEPROM
- ReefAngel_LED --> LED
- ReefAngel_Memory --> Memory
- ORP (New)
- ReefAngel_ATO --> RA_ATO
- ReefAngel_Colors --> RA_Colors
- ReefAngel_CustomColors --> RA_CustomColors
- ReefAngel_Joystick --> RA_Joystick
- ReefAngel_NokiaLCD --> RA_NokiaLCD
- ReefAngel_PWM --> RA_PWM
- ReefAngel_TempSensor --> RA_TempSensor
- ReefAngel_Wifi --> RA_Wifi
- ReefAngel_RF --> RF
- ReefAngel (No Change)
- ReefAngel_Features (No Change)
- ReefAngel_Relay --> Relay
- ReefAngel_Salinity --> Salinity
- ReefAngel_Timer --> Timer
Another notable change is the filename for the code. It was PDE and with the use of Arduino 1.0, that was changed to INO. These libraries will ONLY work with Arduino 1.0. So you must upgrade Arduino. It's recommended that you use the installer that Roberto has provided (makes things so much easier).
http://forum.reefangel.com/viewtopic.php?f=8&t=718
Changes to the libraries.
These are just the highlights that are significant for people. There have been many other behind-the-scenes fixups and improvements plus modifications for some of the future products.
- Temperature probe customizations (This is not currently in RAGen, but will be added in the future).
Code: Select all
Allowed for easy customization of Tank and Overheat temp probes Overheat temp can be customized * use ReefAngel.OverheatProbe = PROBE Heater & Fan/Chiller temp can be customized * use ReefAngel.TempProbe = PROBE PROBE can be T1_PROBE, T2_PROBE or T3_PROBE Place those lines in setup() and after ReefAngel.Init();
- WebBanner is dropped, you now use Portal(). This simplifies the code. You do not need to add in the banner labels or handle the timers. You simply have a Portal() function call in the loop() and that's it. Nothing else to add to setup. Usage:The "username" is your forum username and the optional "key" is the security key you set from your portal page.
Code: Select all
ReefAngel.Portal("username"); or ReefAngel.Portal("username", "key");
- Additional wifi commands added
- Clear ATO alarm (/mt)
- Clear Overheat alarm (/mo)
- PWM slope functions are incorporated into the PWM library. You can still use the standard PWMSlope function but the predefined functions are setup to work with the memory locations. ReefAngel.PWM.Actinic & Daylight Slope(). They are set to operate with the StandardLights on/off times. They also use the memory locations for the start and end percentage and duration.
As you can see, there are lots of additions made. These listed work for the Actinic and Daylight PWM ports on the controller. If you want to use them with the PWM Expansion, you must continue to do it the way you do currently. (This is not in RAGen)
Code: Select all
ReefAngel.PWM.ActinicPWMSlope(byte MinuteOffset); ReefAngel.PWM.DaylightPWMSlope(byte MinuteOffset); ReefAngel.PWM.ActinicPWMSlope(); ReefAngel.PWM.DaylightPWMSlope(); ReefAngel.PWM.ActinicPWMParabola(byte MinuteOffset); ReefAngel.PWM.DaylightPWMParabola(byte MinuteOffset); ReefAngel.PWM.ActinicPWMParabola(); ReefAngel.PWM.DaylightPWMParabola();
- DosingPump function no longer needs a timer. You can have multiple dosing pumps without worry of interference with wavemakers. The function has been improved:
Code: Select all
ReefAngel.DosingPump(byte DPRelay, byte OnHour, byte OnMinute, byte RunTime);
- DosingPumpRepeat also has an offset from the run time now. So you can have your dosing pump run 5 minutes later if you like. This way you can have the pumps repeat every 4 hours and have one be 5 or 10 minutes later than the other, to prevent dosing at the same time.
(This is not in RAGen)
Code: Select all
ReefAngel.DosingPumpRepeat(byte DPRelay, int OffsetMinute, int RepeatMinute, byte RunTime);
- Wavemakers now do not need the built in timers. They still have the interval/run time but the behind-the-scenes code has been trimmed up.
- There is now a Wavemaker Random function. You can have up to 3 random wavemakers. A random value between the Min and Max time is chosen for each toggle period. It's best to have at least 5 - 10 seconds as a minimum toggle period. DO NOT PUT IN 0 otherwise the port might not toggle on or off. (This is not in RAGen)
Code: Select all
ReefAngel.WavemakerRandom(byte WMRelay, int MinWMTimer, int MaxWMTimer); ReefAngel.WavemakerRandom1(byte WMRelay, int MinWMTimer, int MaxWMTimer); ReefAngel.WavemakerRandom2(byte WMRelay, int MinWMTimer, int MaxWMTimer);
- Fixed some content-length errors with wifi responses.
- InternalMemory check on startup to ensure memory locations have been set before use.
- Added Relay.Set() function. This can help simplify some of the if/else statements in your custom code.
Code: Select all
ReefAngel.Relay.Set(PORT, boolean Condition); Example: // Turn on Port 1 when temp 1 is above 80.0 degrees and off when it's 80.0 and below ReefAngel.Relay.Set(Port1, (ReefAngel.Params.Temp[T1_PROBE]>800));
- Improvements with PWM Expansion
- XML data sent from controller has increased for better remote monitoring of all aspects
These were just some of the major highlights with the library release.