This is an old revision of the document!


Programming WeatherDuino devices

Where do I find the WeatherDuino Software?

All system builders can download the WeatherDuino software from the Download Area of the WeatherDuino support forum.
The WeatherDuino source code is published under GNU General Public License v3.0

What do I need in order to program the Receiver, Transmitter or any other WeatherDuino device?

The Arduino Integrated Development Environment (IDE) is used to compile and upload the WeatherDuino software to the microcontroller used in each unit.

Do I need to have Arduino programming skills?

No, there is no need to have programming skills. However its assumed that the user has a minimal knowledge of the Arduino IDE. It is necessary to know how to install libraries and how to make minor edits to code.
Editing the code is only required to change the value of some pre-defined settings, to make the software work correctly with the set of weather instruments you intend to use, and to define some user preferences, such as using metric or imperial units.

Below is an example of the code editing the user must do. Basically its only changing the value of pre-defined variables.

// --------------------------------------------------------------------------------------
//   Define data display units
// --------------------------------------------------------------------------------------
#define DATE_TIME_FORMAT  0    // 0 for dd-mm-yyyy, 1 for yyyy/mm/dd
#define TEMP_DISPLAY_UNIT 0    // 0 for ºC, 1 for ºF
#define ATM_DISPLAY_UNIT  0    // 0 for mBar, 1 for inHg
#define RAIN_DISPLAY_UNIT 0    // 0 for mm, 1 for inches
#define WIND_DISPLAY_UNIT 0    // 0 for Km/h, 1 for mph, 2 for m/s, 3 for Knots

Install Arduino libraries

The WeatherDuino software makes use of several Arduino libraries, which are always included in every software package.
These libraries must be installed (copied) to the Arduino libraries folder. On Windows systems, generally this folder is located at:

C:\Documents\Arduino\libraries

Always install all the supplied libraries, no matter if there are newer versions of the same libraries.
Most compile errors are due to not following this recommendation.

From time to time we may change or upgrade the libraries used by the software. When this happens, there is always a notice in the change.log file that is included with each software release. Read it every time you download a new software version. The same notice is also published on the software download webpage.

Configuring the Software - User Configurable Options

On WeatherDuino software, all user configurable options are stored in one place.
After loading the WeatherDuino software into the Arduino IDE, you should see a tab with the name Config_Options.h - Click on this tab, all user configurable options are there.
Before compiling and uploading any software to any WeatherDuino unit, it is recommended that you look carefully at this file and edit the values to suit your own system. Often the default options aren't suitable for every user.
The software for some devices may also have a file called Credentials.h which you will see in the Credentials.h tab. This is where information such as WiFi ID, WiFi password, WU credentials, etc. are stored. If this file is present you should revise and edit the values as necessary.

faq_arduinoide_config_options.jpg

LOLIN (WeMos) D1 R2 & mini isn't listed in my list of available boards. How do I add it?

In your Arduino IDE:

  • Open Preferences window.
  • Paste this URL into the Additional Board Manager URLs field:
 http://arduino.esp8266.com/stable/package_esp8266com_index.json
  • After installation, you should have many new types of boards available, including the WeMos D1 R2 & mini

OTA programming

Some WeatherDuino devices can be upgraded / programmed by Over The Air (OTA), using your WiFi network.
For this to work you need to have Python 2.7 installed in your computer. If it isn't already installed, download it from here: https://www.python.org/downloads/release/python-2714/
Do not install Python 3.5 as that is not supported.
During installation select the option as pictured in the image below.

Print/export
QR Code
QR Code programming_weatherduino_devices (generated for current page)