Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Overall hardware setup guide
#31

Hi,

By using some php scripts on the server side, its possible to store in a MySQL db any data provided by Cumulus. Having the data in an SQL table you can do whatever you want with it. Unfortunately I can't describe the process in detail, but I'm sure there are here some English speaking users that are using similar functions.

The Pro2 PLUS have two GPIO ports plus one GPO port, which can be used to control external devices. Users can write their own mini pieces of code which will be executed at each minute. Any of variable containing weather data can be used.
On the WeatherDuino Pro2 PLUS software, give a look on the GPIO_Task tab:


Code:
// --------------------------------------------------------------------------------------
//   User programable GPIO tasks
// --------------------------------------------------------------------------------------
#if (USE_GPIO == 1)
void GPIO_tasks()
{
 //                      : Usable vars (most commom)                            - Description
 //
 // Inside Temperature   : Output_T_Int                                         - Inside Temperature in Tenths of Degrees
 // Inside Humidity      : Output_H_Int                                         - Inside Humidity in Tenths of %
 // Outside Temperatures : TX_Unit[TX_UnitID, 0 to 2].TemperaturaExt[Sensor, 0 to 1]  - Temperature from Sensor 0 or 1 at TX unit TX_UnitID, in Tenths of Degree
 // Outside Humidities   : TX_Unit[TX_UnitID, 0 to 2].HumidadeExt[Sensor, 0 to 1]     - Humidity from Sensor 0 or 1 at TX unit TX_UnitID, in Tenths of %
 // Wind Average         : TX_Unit[TX_UnitID].Wind_average                            - Wind Average from TX unit TX_UnitID in m/s * 1000
 // Wind Gust            : TX_Unit[TX_UnitID].Wind_gust                               - Wind Gust from TX unit TX_UnitID in m/s * 1000
 // Wind Dir             : TX_Unit[TX_UnitID].Wind_gust                               - Wind Direction from TX unit TX_UnitID in degrees (0 to 359)
 // Daily Rain           : Output_RToday                                        - Total Rain today in Rain_Display_Unit
 // RainFall Rate        : Output_RainFallRate                                  - Current RainFall Rate in Rain_Display_Unit
 // Solar Radiation      : Output_SRad                                          - Current Solar Radiation in W/m2
 // Index UV             : Output_UV                                            - Value is UV Index * 1000
 // Soil Temperature     : Soil_Data[sensor number 0 to 3][0]                   - Soil temperature in Degrees Celsius
 // Soil Moisture        : Soil_Data[sensor number 0 to 3][1]                   - Soil Moisture in VMC
 // Leaf Temperature     : Leaf_Data[sensor number 0 to 3][0]                   - Leaf temperature in Degrees Celsius
 // Leaf Wetness         : Leaf_Data[sensor number 0 to 3][1]                   - Leaf Wetness. Range is from 0 (dry) to 15.

 // Instructions to use the GPO, GPO_1 and GPO_2 ports on the RX Plus board
 //
 // ATENTION: The GPO output is ACTIVE LOW
 // Use this command turn ON the GPO Output   : setPortLOW(PORTL, 3)
 // Use this command turn OFF the GPO Output  : setPortHIGH(PORTL, 3)

 // GPIO_1 and GPIO_2 outputs are ACTIVE HIGH
 // ** To write to GPIO_1 or GPIO_2 use the following commands:  
 // Use this command to turn ON the GPIO_1 Output  : setPortHIGH(PORTE, 4)
 // Use this command to turn OFF the GPIO_1 Output : setPortLOW(PORTE, 4)
 // Use this command to turn ON the GPIO_2 Output  : setPortHIGH(PORTE, 5)
 // Use this command to turn OFF the GPIO_2 Output : setPortLOW(PORTE, 5)

 // ** To read from GPIO_1 or GPIO_2 use the follwing commands:
 // Read GPIO_1 pin state  : digitalRead(2)
 // Read GPIO_2 pin state  : digitalRead(3)


// -------------------------------------------------------------------
//   IMPORTANT: Never use delays or anything else which takes long time to execute
// -------------------------------------------------------------------

// Examples of usage:
//
// Example 1: The GPO port can be used to directly drive a relay up to 70mA. Remember GPO is ACTIVE LOW!!!
// If Today Rain reaches a defined threshold, the GPO turns OFF the relay,
// which can be used to drive a main valve of a watering system.
 
 float Threshold = 0.3;      
 if (Output_RToday >= Threshold )  // If today rain is greater or equal to defined threshold...
  {  
    setPortHIGH(PORTL, 3);   // Turns OFF the output, disabling the watering system.
  }  
 else setPortLOW(PORTL, 3);  // Turns ON the output, enabling the main valve of the watering system.

//

Reply


Messages In This Thread
Overall hardware setup guide - by coupe pete - 11-02-2018, 10:11
RE: Ovaerll hardware setup guide - by uncle_bob - 11-02-2018, 11:50
RE: Overall hardware setup guide - by coupe pete - 11-02-2018, 12:09
RE: Overall hardware setup guide - by rich27gc - 11-02-2018, 15:02
RE: Ovaerll hardware setup guide - by coupe pete - 11-02-2018, 21:57
RE: Ovaerll hardware setup guide - by uncle_bob - 11-02-2018, 23:19
RE: Ovaerll hardware setup guide - by werk_ag - 12-02-2018, 00:31
RE: Overall hardware setup guide - by coupe pete - 12-02-2018, 04:47
RE: Ovaerll hardware setup guide - by coupe pete - 15-03-2018, 12:44
RE: Ovaerll hardware setup guide - by hornychz - 16-03-2018, 07:42
RE: Ovaerll hardware setup guide - by coupe pete - 17-03-2018, 14:11
RE: Overall hardware setup guide - by coupe pete - 13-05-2018, 10:44
RE: Overall hardware setup guide - by hornychz - 13-05-2018, 11:33
RE: Overall hardware setup guide - by coupe pete - 13-05-2018, 10:49
RE: Overall hardware setup guide - by werk_ag - 13-05-2018, 18:12
RE: Overall hardware setup guide - by uncle_bob - 13-05-2018, 10:57
RE: Overall hardware setup guide - by coupe pete - 13-05-2018, 11:05
RE: Overall hardware setup guide - by uncle_bob - 13-05-2018, 11:12
RE: Overall hardware setup guide - by coupe pete - 13-05-2018, 13:16
RE: Overall hardware setup guide - by hornychz - 13-05-2018, 13:29
RE: Overall hardware setup guide - by uncle_bob - 13-05-2018, 21:39
RE: Overall hardware setup guide - by coupe pete - 13-05-2018, 22:50
RE: Overall hardware setup guide - by werk_ag - 13-05-2018, 23:02
RE: Overall hardware setup guide - by coupe pete - 13-05-2018, 23:05
RE: Overall hardware setup guide - by uncle_bob - 14-05-2018, 00:20
RE: Overall hardware setup guide - by hornychz - 14-05-2018, 06:27
RE: Overall hardware setup guide - by coupe pete - 14-05-2018, 07:26
RE: Overall hardware setup guide - by coupe pete - 14-05-2018, 10:53
RE: Overall hardware setup guide - by hornychz - 14-05-2018, 13:01
RE: Overall hardware setup guide - by coupe pete - 17-05-2018, 07:00
RE: Overall hardware setup guide - by werk_ag - 18-05-2018, 02:24
RE: Overall hardware setup guide - by uncle_bob - 18-05-2018, 03:50
RE: Overall hardware setup guide - by coupe pete - 18-05-2018, 03:59
RE: Overall hardware setup guide - by werk_ag - 18-05-2018, 04:46
RE: Overall hardware setup guide - by coupe pete - 18-05-2018, 05:01
RE: Overall hardware setup guide - by coupe pete - 20-05-2018, 05:07
RE: Overall hardware setup guide - by werk_ag - 20-05-2018, 05:42
RE: Overall hardware setup guide - by coupe pete - 20-05-2018, 09:08
RE: Overall hardware setup guide - by werk_ag - 20-05-2018, 22:11
RE: Overall hardware setup guide - by coupe pete - 21-05-2018, 02:54
RE: Overall hardware setup guide - by werk_ag - 21-05-2018, 03:47
RE: Overall hardware setup guide - by coupe pete - 21-05-2018, 06:19
RE: Overall hardware setup guide - by uncle_bob - 21-05-2018, 10:31
RE: Overall hardware setup guide - by coupe pete - 21-05-2018, 11:28
RE: Overall hardware setup guide - by werk_ag - 22-05-2018, 00:02
RE: Overall hardware setup guide - by coupe pete - 21-05-2018, 11:36
RE: Overall hardware setup guide - by coupe pete - 21-05-2018, 11:40
RE: Overall hardware setup guide - by coupe pete - 22-05-2018, 00:39
RE: Overall hardware setup guide - by werk_ag - 22-05-2018, 01:26



Users browsing this thread: 1 Guest(s)