Return to IoT Kits

7B. Weather Station Firmware Configuration – Manually Programmed

You may skip this step if you have purchased a preprogrammed kit.

Configuration of ThingSpeak_config.h

All weather station sketches need a ThingSpeak_config.h file. It must be located in the same folder as the sketch XXX.ino file.

Open the sketch in the Arduino IDE. Select the ThingSpeak_config.h or appropriate tab and edit the information for your station as indicated by the comments within the file.

Information needed:

  • Your WiFi SSID (You must use 2.4 GHz not 5 GHz.)
  • Your WiFi password
  • Station elevation in meters. You can get this at www.freemaptools.com
  • Sleep interval in seconds: 60 for testing, 600 or longer for normal service
  • ThingSpeak channel ID (a numerical value)
  • ThingSpeak API Write Key (alphanumeric between quotes)
  • For the remote display kits, you must select the appropriate timezone by uncommenting your location.
  • OPTIONAL (Values determined from running D1M-WX1_Calibration.ino)
    • DMM voltage
    • ADC reading

Save the sketch. Set the PROG/RUN switch to PROG and upload to the microcontroller. Return the switch to RUN after a successful upload.

Configuration of APRS_config.h

Only sketches using APRS need an APRS_config.h file. You must have a valid amateur radio license to use APRS.

Information needed:

  • Find your location at www.distancesto.com/
    • latitude (decimal degrees, positive for north, negative for south)
    • longitude (decimal degrees, positive for east, negative for west)
  • CALLSIGN-SSID
  • APRS passcode
  • For the remote display kits, you must select the appropriate timezone by uncommenting your location.

Save the sketch. Set the PROG/RUN switch to PROG and upload it to the D1 Mini. Return the switch to RUN after a successful upload.

Permanent link to this article: https://w4krl.com/iot-kits/firmware-config/

Leave a Reply