Exploring soil moisture sensors: Difference between revisions

From Sensors in Schools
Jump to navigation Jump to search
(Created page with "== Connecting to a soil moisture sensor on the things network == == Overview == * In this lesson we are going to connect to a soil moisture sensor. * The soil moisture sensor is connected to an Arduino MKR 1300 microcontroller (a small computer). * The data will be transmitted to the '''LoRa''' network. * LoRa is short for '''Long Range''' radio communication. * The data is then sent to The Things Network, which is a community run server that collects data from sens...")
 
Line 1: Line 1:
== Connecting to a soil moisture sensor on the things network ==
== Connecting to a soil moisture sensor via The Things Network (TTN) ==


== Overview ==
== Overview ==

Revision as of 05:19, 1 January 2022

Connecting to a soil moisture sensor via The Things Network (TTN)

Overview

  • In this lesson we are going to connect to a soil moisture sensor.
  • The soil moisture sensor is connected to an Arduino MKR 1300 microcontroller (a small computer).
  • The data will be transmitted to the LoRa network.
  • LoRa is short for Long Range radio communication.
  • The data is then sent to The Things Network, which is a community run server that collects data from sensors and makes the data available for download.
  • We will download the data to our Raspberry Pi, and in future lessons display that data in a Dashboard using Node-RED.
  • All these skills are very important in helping to address Climate Change and general Environmental Sustainability issues the world faces.

Learning Objectives

  • Learn how to connect to The Things Network using MQTT using Node-Red
  • Learn how to extract specific data from JSON formatted data packets

Connecting to the Things network using Node-RED

  • In this lesson we are going to use Node-RED as our main programming tool.
  • Node-RED is a block or node based programming language.
  • Each block has a discrete function and some blocks can contain Javascript code or be configured in different ways.
  • Blocks are connected together using wires.
  • Node-RED and the programs on the Raspberry Pi are always being updated, so it’s normally good practise to update our Raspberry Pi on a regular basis.


Updating and Upgrading the Raspberry Pi

  • Open the Raspberry Pi Terminal.
  • Enter the command sudo apt-get update