Encrypted weather station

Adelin
3 min readNov 28, 2021

Task: Develop a weather station that will encrypt data between transmitter and receiver

The Transceiver:

It consists of an Arduino Nano board, which will record the data on atmospheric pressure, temperature, and altitude provided by the BMP280 sensor. The data collected by the sensor will be encrypted using 256-bit AES encryption and transmitted to the receiver via the NRF24 module.

How to connect the parts:

  • The NRF24 module to the Arduino Nano board:

SCK Pin of the NRF module to Digital pin 13 of the Arduino Nano: SCK → D13

MISO→ D12

MOSI→D11

VCC→3.3V

GND→GND

CNS → D10

CE→ D9

  • The BMP280 module to the Arduino Nano board:

VCC→ VCC 3.3V

GND→GND

SCL→A5

SDA→A4

The Arduino code:

#include <aes.h>
#include <aes256_dec.h>
#include <aes256_enc.h>
#include <AESLib.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
#include <SPI.h>
#include <AESLib.h>

#include <Wire.h>
#include “Adafruit_BMP280.h”
Adafruit_BMP280 bmp;
RF24 myRadio (9, 10);
byte addresses[][6] = {“0”};
char data[40];
String str;

void setup()
{
bmp.begin();
Serial.begin(9600);
myRadio.begin();
myRadio.setChannel(115);
myRadio.setPALevel(RF24_PA_MAX);
myRadio.setDataRate( RF24_250KBPS ) ;
myRadio.openWritingPipe( addresses[0]);
delay(1000);

--

--

Adelin

⛥Passionate about technology, innovation,programming, IT&C ⛥interested in self development