Getting started - crestlinesoaring/ArduinoWeatherStation GitHub Wiki

Purpose

This page explains how to get started working with the Arduino software for the weather station.

Tools

Arduino

Although there are many tools available for developing on Arduino platforms, our instructions use the standard Arduino Integrated Development Environment (IDE) found here. You will first need to download and install it.

After installing the Arduino IDE, open it and click File -> Preferences then note the "Sketchbook location" path as it will be needed later. Then, close the Arduino IDE.

If you already have the Arduino IDE installed

If you already have the Arduino IDE installed, please make sure to adjust your formatting settings to match this repository. We use spaces only (no tabs) with 2 spaces per indent. To ensure you are using these settings, click File -> Preferences in the Arduino editor and note the link near the bottom (labeled "More preferences can be edited directly in the file"). Open that preferences.txt and look for editors.tabs.expand and editors.tabs.size. We want:

editor.tabs.expand=true
editor.tabs.size=2

GitHub

You will need a personal GitHub account to contribute; sign up for a free one here.

Any git client may be used to retrieve resources for this project (for instance, GitHub desktop), but these instructions will use GitKraken (free for non-commercial use). You will need to download and install the GitKraken client to use it.

Cloning

You will need a copy of the code to work on. To get one, you are going to download the entire git repository (history of all changes to the project) so that you can add new changes.

Core group members

For members of crestlinesoaring, you can read from and write to this GitHub repository directly.

  1. Make sure you've informed an crestlinesoaring administrator of your GitHub user name
  2. Open GitKraken and log in with GitHub
  3. Click on the profile icon near the upper right and set your name and email correctly
  4. Click on the folder icon in the upper left
  5. Select "Clone" in the left pane
  6. Select "GitHub.com" in the middle pane
  7. Enter your sketchbook folder (something like C:\Users<yourname>\Documents\Arduino on Windows computers) in "Where to clone to"
  8. For "Repository to clone", there should be an entry named "ArduinoWeatherStation" under "crestlinesoaring"; select it. If this entry is not present, contact a crestlinesoaring administrator.
  9. Click "Clone the repo!"

Alternately, for those who prefer the non-ambiguity of command line, you can use git bash to clone your repository including all submodules:

git clone --recursive https://github.com/crestlinesoaring/ArduinoWeatherStation.git '<your local sketchbook path>'

The repository should now be downloaded to your sketchbook folder.

Other contributors

For contributors who are not part of crestlinesoaring, follow the standard guidelines for pull requests. An overview may be found here. The general idea is to:

  1. Fork this repository (create your own copy of it)
  2. Clone that forked repository (create a copy of that repository on your computer)
  3. Create a new branch (start stacking your new changes on a new line of development)
  4. Make changes
  5. Stage and commit those changes (add the changes to the repository on your computer)
  6. Push your branch (copy your branch from the repository on your computer to your forked repository on GitHub)
  7. Start a pull request on GitHub.com To continue with this document, you only need to complete through step 2.

Libraries

This project relies on a few Arduino libraries you will need before building. The correct versions are embedded in this repository as git submodules and they are downloaded automatically when you clone this repository. The libraries are not available to the Arduino IDE until you manually copy them into an Arduino libraries folder. Navigate to your ArduinoWeatherStation sketchbook folder and go into the "libraries" subfolder. Copy all of those folders to your Arduino "libraries" folder located in your sketchbook folder (You noted your sketchbook folder in the Tools.Arduino section above; it should be something like C:\Users<yourname>\Documents\Arduino on Windows computers).

Site-specific header

To compile this project, you must also obtain a non-public site-specific header file (Marshall.h) and put it in your ArduinoWeatherStation folder.

Test compile

You should now be able to build the project. First, open the project in the Arduino IDE (File -> Sketchbook -> ArduinoWeatherStation). Then, set the board properly: Tools -> Board -> Arduino/Genuino Mega or Mega 2560. Then, click Sketch -> Verify/Compile. If there are no error messages, you have compiled successfully and can upload to an Arduino. Please note that a Baudrate of 115200 is used for the terminal.

⚠️ **GitHub.com Fallback** ⚠️