This is an old revision of the document!


Programming WeatherDuino devices

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

The Arduino 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 the user have a minimal knowledge of the Arduino IDE environment. Knowing how to install libraries, as also being able to do minimal code edition, its necessary .
Edition of the code is required only to change the value of some pre-defined settings, to make that the software will correctly work with the set of weather instruments you intend to use, and to define some user preferences, as using metric or imperial units.

Bellow is an example of the type of code edition 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 always are included in every software package.
Those 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 happen, always there is a notice in the change.log file that is included in each software release. Read it every time you download a new software version. By other hand, the same notice always is also published on the software download webpage.

Where are the user configurable options?

On WeatherDuino software, all user configurable options are just in one place.
After loading the Weatherduino software with 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 upload any software to any WeatherDuino unit, its recommended that the user revise and edit this file to suite their own system. Often default options aren't suitable for each user.
The software for some units, may also have a file called Credentials.h which you will find in the Credentials.h tab. Here is where info like WiFi ID and password, WU credentials, etc. are stored. When present, user should also revise and edit as needed.

WeMos D1 R2 & mini isn't listed in my list of available boards. How to add it?

In your Arduino IDE:

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

For OTA software upgrades also need to install Python 2.7 (do not install Python 3.5 that is not supported).
Download it from here: https://www.python.org/downloads/release/python-2714/
During install select the option as pictured in the image bellow.

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