Difference between revisions of "Component: BBC Weather Forecast (Comms: IoT/Cloud)"
Line 85: | Line 85: | ||
On an embedded device you would need a TCP/IP component to allow the communications to the BBC server. This then links to the Network Comms component. | On an embedded device you would need a TCP/IP component to allow the communications to the BBC server. This then links to the Network Comms component. | ||
+ | |||
+ | |||
Line 364: | Line 366: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
Revision as of 12:18, 3 February 2023
Author | MatrixTSL |
Version | 1.0 |
Category | Comms: IoT/Cloud |
Contents
- 1 BBC Weather Forecast component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 GetDayName
- 5.2 GetDaySummary
- 5.3 GetHumidity
- 5.4 GetLocationName
- 5.5 GetMaxTemperature
- 5.6 GetMinTemperature
- 5.7 GetPollution
- 5.8 GetPressure
- 5.9 GetSunrise
- 5.10 GetSunset
- 5.11 GetUVRisk
- 5.12 GetVisibility
- 5.13 GetWindDirection
- 5.14 GetWindSpeed
- 5.15 Initialise
- 5.16 RequestData
- 5.17 SetForecastDay
- 5.18 SetLocationCode
- 6 Property reference
BBC Weather Forecast component
Easily allows you to collect three day forecasted weather metrics for your area using the BBC Weather data service. Supports Min/Max temperature, Wind Direction, Wind Speed, Visibility, Pressure, Humidty, UV Risk, Pollution and Sun Rise/Set times for your selected area.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_temp/BBCWeatherForecast.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/BBCWeatherForecast.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a basic example to read the three day forecast data and report the information on a graphical display.
The location can be set by adjusting the BBC Weather location property, see the component property tooltips for more information on how to do this.
On an embedded device you would need a TCP/IP component to allow the communications to the BBC server. This then links to the Network Comms component.
Macro reference
GetDayName
GetDayName | |
Gets the name of the currently selected day as a string. | |
- STRING | Return |
GetDaySummary
GetDaySummary | |
Gets the summary of the currently selected day as a string. | |
- STRING | Return |
GetHumidity
GetHumidity | |
Reads the forecast humidity in Relative Humdity for the selected day. | |
- BYTE | Return |
GetLocationName
GetLocationName | |
Reads the reported location name as a string. | |
- STRING | Return |
GetMaxTemperature
GetMaxTemperature | |
Reads the forecast maximum temperature in the selected scale for the selected day. | |
- BOOL | Scale |
0 = Celcius, 1 = Farenheit | |
- INT | Return |
GetMinTemperature
GetMinTemperature | |
Reads the forecast minimum temperature in the selected scale for the selected day. | |
- BOOL | Scale |
0 = Celcius, 1 = Farenheit | |
- INT | Return |
GetPollution
GetPollution | |
Reads the forecast pollution as a string for the selected day. | |
- STRING | Return |
GetPressure
GetPressure | |
Reads the forecast air pressure in milli bar (mb) for the selected day. | |
- UINT | Return |
GetSunrise
GetSunrise | |
Reads the forecast sunrise time as a string for the selected day. | |
- STRING | Return |
GetSunset
GetSunset | |
Reads the forecast sunset time as a string for the selected day. | |
- STRING | Return |
GetUVRisk
GetUVRisk | |
Reads the forecast UV Risk for the selected day. | |
- BYTE | Return |
GetVisibility
GetVisibility | |
Reads the forecast visibility for the selected day. | |
- STRING | Return |
GetWindDirection
GetWindDirection | |
Reads the forecast wind direction as a string for the selected day. | |
- STRING | Return |
GetWindSpeed
GetWindSpeed | |
Reads the reported wind speed in MPH for the selected day. | |
- BYTE | Return |
Initialise
Initialise | |
Sets up the component ready to collect weather data. | |
- VOID | Return |
RequestData
SetForecastDay
SetForecastDay | |
Chooses which day of the three day forecast to look at. | |
- BYTE | Day |
0 = Today, 1 = Tomorrow, 2 = Day After Tomorrow | |
- VOID | Return |
SetLocationCode