Microbit IOT Weather Station

Posted by

Last week, I put the “technical” finishes on a Microbit IOT weather station. The station uses two Microbits, one to take the weather measurements and transmit the data over the Microbit’s radio to the second Microbit. The second Microbit receives the radio data and uploads the data to the ThingSpeak website.

The following hardware is used:

Weather Data Microbit:

1 Microbit

1 Sparkfun Weather:bit

1 Sparkfun Weather Meter

1 Voltaic 3.5 Watt Solar Charger Kit (Big thanks for Voltaic for the donation)

or Adafruit Solar Charger and Lithium Battery

IoT Microbit:

1 Microbit

1 Elecfreaks Iot:bit

Software

The software is structured, so that about every ten minutes, the IoT Microbit sends a request to the Weather Microbit to send it the weather data. The IoT Microbit then uploads the data to Thingspeak and waits another 10 minutes. There is one workaround which I will explain later.

Weather Microbit Software

The Forever blocks only displays a dot to indicate that the Microbit is running. About every 10 minutes the IoT Microbit sends over the radio a series of letters requesting the weather data. All of this is handled in the On Radio Received blocks. Since the “radio send value” cannot send a string (i.e. letters), the eight wind directions are converted to a number.

The On Start blocks start the weather monitoring. The is an Extension created by Sparkfun and must be imported. Next it sets the radio group number.

IoT Microbit

The On Start blocks start the . The is an Extension created by ElecFreaks and must be imported. Next it sets the radio group number.

Below is a screen shot of the ThingSpeak website setup to receive the weather data. Create a comment of you have a question or suggestion. I know the code could be optimized. 😉
Weather Data
Completed Weather Station

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s