# Using LoraWAN and The Things Network with CircuitPython

## Overview

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/067/119/medium800/wireless_P1000318.jpg?1544117179)

In this project, we're going to build a small weather-logging node using a Feather and a temperature sensor. The captured data will then be sent over LoRaWAN to The Things Network.

_Wait, this sounds [similar to the a previous guide we have](https://learn.adafruit.com/the-things-network-for-feather). What's different?_

Good catch - the difference is that **this guide is for use with&nbsp;[CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython)**, meaning **you can get your project up and running on the Things Network quicker than ever**. Also, since we're using CircuitPython, this guide is compatible with Python Linux boards, like the Raspberry Pi family.&nbsp;

## What is The Things Network?
https://www.youtube.com/watch?v=U4UrXl-SGEo

The [Things Network](https://www.thethingsnetwork.org/) is a project dedicated to building a [network](https://www.thethingsnetwork.org/tech-stack) for the Internet of Things. While WiFi is used in most Internet of Things devices, The Things Network uses a protocol called **LoRaWAN** which allows devices to talk to the internet _without cellular or WiFi connectivity_. This means you don't need to worry about protected wireless hotspots, cellular data plans, or spotty WiFi connectivity.&nbsp;

It's **ideal** for most internet of things projects, and unlike cellular plans or WiFi - it's&nbsp; **free to use**.

There are many gateways available to connect your CircuitPython device to - [if you'd like to find a gateway in your area, check the Gateway Map.](https://www.thethingsnetwork.org/community)

## Parts
Our **Feather M0 RFM9x** is an all-in-one Feather with an onboard RFM9x radio module cooked in, built-in USB, and battery charging (highly useful for deploying LoRa nodes).&nbsp;

### Adafruit Feather M0 with RFM95 LoRa Radio - 900MHz

[Adafruit Feather M0 with RFM95 LoRa Radio - 900MHz](https://www.adafruit.com/product/3178)
This is the **Adafruit Feather M0 RFM95 LoRa Radio (900MHz)****. **We call these _RadioFruits** ,**_ our take on an microcontroller with a "[Long Range (LoRa)](https://www.lora-alliance.org/)" packet radio transceiver with built...

In Stock
[Buy Now](https://www.adafruit.com/product/3178)
[Related Guides to the Product](https://learn.adafruit.com/products/3178/guides)
![Angel shot Adafruit Feather M0 with RFM95 LoRa Radio - 900MHz](https://cdn-shop.adafruit.com/640x480/3178-07.jpg)

**Already have a CircuitPython-Compatible board (or a Raspberry Pi)?** There are **multiple** ways to connect - the all-in-one Feather M0 LoRa and the stack-able Radio FeatherWing:

### Adafruit RFM95W LoRa Radio Transceiver Breakout - 868 or 915 MHz

[Adafruit RFM95W LoRa Radio Transceiver Breakout - 868 or 915 MHz](https://www.adafruit.com/product/3072)
_"You see, wire telegraph is a kind of a very, very long cat.&nbsp; You pull his tail in New York and his head is meowing in Los Angeles.&nbsp; Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there.&nbsp; The only difference is..._

In Stock
[Buy Now](https://www.adafruit.com/product/3072)
[Related Guides to the Product](https://learn.adafruit.com/products/3072/guides)
![Angled shot of a Adafruit RFM95W LoRa Radio Transceiver Breakout.](https://cdn-shop.adafruit.com/640x480/3072-07.jpg)

### Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz

[Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz](https://www.adafruit.com/product/3231)
Add short-hop wireless to your Feather with these RadioFruit Featherwings. These add-ons for any Feather board will let you integrate packetized radio (with the RFM69 radio) or LoRa radio (with the RFM9x's). These radios are good options for kilometer-range radio, and paired with one of...

In Stock
[Buy Now](https://www.adafruit.com/product/3231)
[Related Guides to the Product](https://learn.adafruit.com/products/3231/guides)
![Angled shot of a Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz - RadioFruit.](https://cdn-shop.adafruit.com/640x480/3231-13.jpg)

We'll also use a Si7021 temperature and humidity sensor to log and record whether it's sweltering or freezing.

### Adafruit Si7021 Temperature & Humidity Sensor Breakout Board

[Adafruit Si7021 Temperature & Humidity Sensor Breakout Board](https://www.adafruit.com/product/3251)
It's summer and you're sweating and your hair's all frizzy and all you really want to know is why the weatherman said this morning that today's relative humidity would max out at a perfectly reasonable 42% when it feels more like 77%. Enter the&nbsp; **Si7021 Temperature +...**

In Stock
[Buy Now](https://www.adafruit.com/product/3251)
[Related Guides to the Product](https://learn.adafruit.com/products/3251/guides)
![Angled shot of black, rectangular temperature and humidity sensor breakout.](https://cdn-shop.adafruit.com/640x480/3251-05.jpg)

## Materials

You'll want to pick these up from the Adafruit Store if you don't have them on-hand already:

### Part: Half-size breadboard
quantity: 1
Hook up breakouts easily
[Half-size breadboard](https://www.adafruit.com/product/64)

### Part: Breadboard Wire Bundle
quantity: 1
Lots of wires for use with any breadboard
[Breadboard Wire Bundle](https://www.adafruit.com/product/153)

If you're running a weather logger, you'll want to include a LiPo Battery in your build. LoRa has less power-draw than WiFi, so your node should be able to run unattended for a while.

### Part: LiPo Battery
quantity: 1
Ideal for Feather
[LiPo Battery](https://www.adafruit.com/product/2011)

- [Next Page](https://learn.adafruit.com/using-lorawan-and-the-things-network-with-circuitpython/wiring.md)

## Featured Products

### Adafruit Feather M0 RFM69HCW Packet Radio - 868 or 915 MHz

[Adafruit Feather M0 RFM69HCW Packet Radio - 868 or 915 MHz](https://www.adafruit.com/product/3176)
This is the**&nbsp;Adafruit Feather M0 RFM69 Packet Radio&nbsp;(868 or 915 MHz)****. **We call these _RadioFruits** ,**_ our take on an microcontroller with a RFM69HCW packet radio transceiver plus built in USB and battery charging. Its an Adafruit...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3176)
[Related Guides to the Product](https://learn.adafruit.com/products/3176/guides)
### Adafruit RFM95W LoRa Radio Transceiver Breakout - 868 or 915 MHz

[Adafruit RFM95W LoRa Radio Transceiver Breakout - 868 or 915 MHz](https://www.adafruit.com/product/3072)
_"You see, wire telegraph is a kind of a very, very long cat.&nbsp; You pull his tail in New York and his head is meowing in Los Angeles.&nbsp; Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there.&nbsp; The only difference is..._

In Stock
[Buy Now](https://www.adafruit.com/product/3072)
[Related Guides to the Product](https://learn.adafruit.com/products/3072/guides)
### Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz

[Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz](https://www.adafruit.com/product/3231)
Add short-hop wireless to your Feather with these RadioFruit Featherwings. These add-ons for any Feather board will let you integrate packetized radio (with the RFM69 radio) or LoRa radio (with the RFM9x's). These radios are good options for kilometer-range radio, and paired with one of...

In Stock
[Buy Now](https://www.adafruit.com/product/3231)
[Related Guides to the Product](https://learn.adafruit.com/products/3231/guides)
### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
### Adafruit Feather M0 Express

[Adafruit Feather M0 Express](https://www.adafruit.com/product/3403)
At the Feather M0's heart is an ATSAMD21G18 ARM Cortex M0+ processor, clocked at 48 MHz and at 3.3V logic, the same one used in the new&nbsp;[Arduino Zero](https://www.adafruit.com/products/2843). This chip has a whopping 256K of FLASH (8x more than the Atmega328 or 32u4) and...

In Stock
[Buy Now](https://www.adafruit.com/product/3403)
[Related Guides to the Product](https://learn.adafruit.com/products/3403/guides)
### Adafruit Si7021 Temperature & Humidity Sensor Breakout Board

[Adafruit Si7021 Temperature & Humidity Sensor Breakout Board](https://www.adafruit.com/product/3251)
It's summer and you're sweating and your hair's all frizzy and all you really want to know is why the weatherman said this morning that today's relative humidity would max out at a perfectly reasonable 42% when it feels more like 77%. Enter the&nbsp; **Si7021 Temperature +...**

In Stock
[Buy Now](https://www.adafruit.com/product/3251)
[Related Guides to the Product](https://learn.adafruit.com/products/3251/guides)
### The Things Gateway - 915Mhz Version

[The Things Gateway - 915Mhz Version](https://www.adafruit.com/product/3943)
 **The**  **Things Gateway** is open! Come forth all ye who wish for a community-led, open-source&nbsp;Internet of Things smart city network. This Internet gateway router is [designed by The Things Network](https://www.thethingsnetwork.org/), so you know<a...></a...>

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/3943)
[Related Guides to the Product](https://learn.adafruit.com/products/3943/guides)
### 8 Channel LoRa Gateway HAT with LoRa and GPS Antenna - SX1301

[8 Channel LoRa Gateway HAT with LoRa and GPS Antenna - SX1301](https://www.adafruit.com/product/4284)
If you're building a Raspberry Pi project and need to send data back-and-forth, the WiFi module built into newer Pi's should be fine for most cases.

_However_, WiFi does not have a long range and also requires both investment (through your ISP) and setup (routers, access...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4284)
[Related Guides to the Product](https://learn.adafruit.com/products/4284/guides)

## Related Guides

- [Adafruit Si7021 Temperature + Humidity Sensor](https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor.md)
- [Adafruit Feather M0 Express](https://learn.adafruit.com/adafruit-feather-m0-express-designed-for-circuit-python-circuitpython.md)
- [Adafruit Feather M4 Express](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51.md)
- [I2C Addresses and Troublesome Chips](https://learn.adafruit.com/i2c-addresses.md)
- [Porting an Arduino library to CircuitPython: VL6180X Distance Sensor](https://learn.adafruit.com/porting-an-arduino-library-to-circuitpython-vl6180x-distance-sensor.md)
- [DIY Robotic Sky Tracking Astrophotography Mount with CircuitPython](https://learn.adafruit.com/diy-robotic-sky-tracking-astrophotography-mount.md)
- [How to Program SAMD Bootloaders](https://learn.adafruit.com/how-to-program-samd-bootloaders.md)
- [Adafruit BMP388 and BMP390 - Precision Barometric Pressure and Altimeter](https://learn.adafruit.com/adafruit-bmp388-bmp390-bmp3xx.md)
- [¡Bienvenido a CircuitPython!](https://learn.adafruit.com/bienvenido-a-circuitpython-2.md)
- [CircuitPython Hardware: LED Backpacks & FeatherWings](https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings.md)
- [Humidity and Temperature Monitor with E-Ink Display](https://learn.adafruit.com/humidity-and-temperature-monitor-redux-e-ink-display.md)
- [MIDI Melody Maker](https://learn.adafruit.com/midi-melody-maker.md)
- [CircuitPython 101: Functions](https://learn.adafruit.com/circuitpython-101-functions.md)
- [Esenciales para CircuitPython](https://learn.adafruit.com/esenciales-para-circuitpython.md)
- [Adafruit IO Home: Lights and Temperature ](https://learn.adafruit.com/adafruit-io-house-lights-and-temperature.md)
- [CircuitPython I2C and SPI Under the Hood](https://learn.adafruit.com/circuitpython-basics-i2c-and-spi.md)
- [CircuitPython Basics: Analog Inputs & Outputs](https://learn.adafruit.com/circuitpython-basics-analog-inputs-and-outputs.md)
- [Touch Deck: DIY Customizable TFT Control Pad](https://learn.adafruit.com/touch-deck-diy-tft-customized-control-pad.md)
