Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Making Code for Weather Station

Making Code for Weather Station

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 4 Posters 3.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brutus
    wrote on last edited by Brutus
    #1

    Hi,

    I'm new to the mysensors community and have a question about compiling the needed code.

    I have ordered several parts to make my own Weather Station:

    Serial Gateway:

    • Arduino Nano USB V3.0
    • NRF24L01+ Wireless Tranceiver

    Weather Station:

    • Pro mini Arduino 3.3V
    • BH1750FVI Digital Light Intensity Sensor
    • BMP085 Digital Baromatic Pressure Sensor.
    • DHT22 Digital Temperature and Humidity Sensor
    • Rain Weather Module Detection Sensor

    Later on I would like to add a Wind sensor to make the weather station complete.

    I can see on the forum and website that there are several codes for the sensor. But what to do when you will connect all the sensors together?

    Thnx for the help so far.

    Greetings Brutus.

    SparkmanS 1 Reply Last reply
    0
    • B Brutus

      Hi,

      I'm new to the mysensors community and have a question about compiling the needed code.

      I have ordered several parts to make my own Weather Station:

      Serial Gateway:

      • Arduino Nano USB V3.0
      • NRF24L01+ Wireless Tranceiver

      Weather Station:

      • Pro mini Arduino 3.3V
      • BH1750FVI Digital Light Intensity Sensor
      • BMP085 Digital Baromatic Pressure Sensor.
      • DHT22 Digital Temperature and Humidity Sensor
      • Rain Weather Module Detection Sensor

      Later on I would like to add a Wind sensor to make the weather station complete.

      I can see on the forum and website that there are several codes for the sensor. But what to do when you will connect all the sensors together?

      Thnx for the help so far.

      Greetings Brutus.

      SparkmanS Offline
      SparkmanS Offline
      Sparkman
      Hero Member
      wrote on last edited by
      #2

      @Brutus Hi Brutus, welcome to the forum. You need to take the different sketches and combine them into one sketch. Sometimes this is not straight-forward as certain sketches are designed for the sensor to go to sleep for a period of time, some, like the DHT22, can only send data periodically, etc. If you search the forum, others have posted details about their weather stations, so you can check those first and potentially use their sketches as starting points. If you run into issues with your own sketch once you have developed it, post it here and the board members will jump in and try and help out.

      Cheers
      Al

      1 Reply Last reply
      0
      • HeinzH Offline
        HeinzH Offline
        Heinz
        Hero Member
        wrote on last edited by Heinz
        #3

        I have already merged the sketch for a dht-22 and a bmp085 sensor. You can take the sketch as a starting point

        https://github.com/windkh/mysensors/blob/master/WeatherStationSensor/WeatherStationSensor.ino

        Always have look at the memory consumption of your sketch. Merging too many sketches into one will eat up your memory very quickly.

        1 Reply Last reply
        0
        • sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by
          #4

          Here is some imspiration from my weather-sensor (without rain though): My outdoor weather sensor

          Controller: Proxmox VM - Home Assistant
          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

          1 Reply Last reply
          0
          • HeinzH Offline
            HeinzH Offline
            Heinz
            Hero Member
            wrote on last edited by
            #5

            @sundberg84 nice project. I noticed that the code in your weatherstation makes use of the buggy forecast algorithm. You should update your sketch to have reliable data in future.

            1 Reply Last reply
            0
            • sundberg84S Offline
              sundberg84S Offline
              sundberg84
              Hardware Contributor
              wrote on last edited by
              #6

              THanks. I din but forgot to update the post.

              Controller: Proxmox VM - Home Assistant
              MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
              MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
              RFLink GW - Arduino Mega + RFLink Shield, 433mhz

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Brutus
                wrote on last edited by Brutus
                #7

                Thnx guys for all your answers.

                I will look into the possibilities to merge some sketches.

                @Heinz Most people use less sensors then I will do. U think that it will not fit on the Arduino Nano ?

                Greetings.

                1 Reply Last reply
                0
                • HeinzH Offline
                  HeinzH Offline
                  Heinz
                  Hero Member
                  wrote on last edited by
                  #8

                  @Brutus
                  Yes, memory on the nano is limited. I already ran out of memory when merging ketches, but fortunately the compiler tells you that at compile time.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  10

                  Online

                  11.7k

                  Users

                  11.2k

                  Topics

                  113.1k

                  Posts


                  Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • MySensors
                  • OpenHardware.io
                  • Categories
                  • Recent
                  • Tags
                  • Popular