This repository contains a project for the course Embedded Software for the Internet of Things @Unitn.
The project consists in a system that generate seeds using a Lava Lamp as a source of entropy. These seeds are then used to encrypt and decrypt messages using AES (Advanced Encryption Standard), generate random numbers and so on.
- The system has a LCD display that allows the user to:
- generate new seeds
- generate randoms numbers in a given range
- change display settings sush as: animations and color theme
- The system implements a Telegram bot the allows the user to:
- generate random numbers
- encrypt and decrypt messages
- ESP32-Wrover-Cam
- MSP432P401R
- MSP432P401R BoosterPack
- Lava Lamp
.
├── ESP32-Wrover-Cam
│ ├── include
│ │ └── ...
│ ├── platformio.ini
│ └── src
│ ├── main.cpp
│ └── ...
├── MSP432
│ ├── Debug
│ │ └── ...
│ ├── LcdDriver
│ │ └── ...
│ ├── driverLibInstruction.md
│ ├── libs
│ │ ├── LavaLampInterface
│ │ │ └── ...
│ │ ├── LavaLampInterruptsAndSetup
│ │ │ └── ...
│ │ └── shared.h
│ ├── msp432p401r.cmd
│ ├── src
│ │ └── main.c
│ ├── startup_msp432p401r_ccs.c
│ ├── system_msp432p401r.c
│ └── targetConfigs
│ └── ...
├── README.md
└── images
└── ...
The ESP32-Wrover-Cam folder contains the code for the ESP32. The code is written in C++ and it uses the Arduino framework. The code is structured in the following way:
includecontains the header filessrccontains the source files
The MSP432 folder contains the code for the MSP432. The code is written in C and it uses the CCS framework. The code is structured in the following way:
Debugcontains the debug filesLcdDrivercontains the LCD driver fileslibscontains the libraries created by us used for the projectsrccontains the source filestargetConfigscontains the target configuration files
✅ PlatformIO extension / ArduinoIDE (not tested)
✅ CCS
We assume that you have already installed Visual Studio Code with PlatformIO extension and CCS with the MSP432P401R support. If you haven't done it yet, please follow the instructions in the links above.
Clone the repository using the following command:
git clone https://github.com/luiss07/LavaLampEncryption.git-
Open the
MSP432folder in CCS -
Include the following libraries in the project:
LcdDriver( already included in the repository )driverLib➡️ Download ➡️ follow the DriverLibInstruction to install the library.
-
Build and upload the code
- Open the
ESP32-Wrover-Camfolder in Visual Studio Code - Create the
include/secrets.hfile and set the following parameters:
#ifndef __SECRETS_H__
#define __SECRETS_H__
#define WIFI_SSID "your_wifi_ssid"
#define WIFI_PASSWORD "your_wifi_password"
#define TOKEN "your_telegram_bot_token"
#endif- Connect the ESP32 to your computer
- Build and upload the code
- Connect the ESP32 to the MSP432 using the following pins:
| ESP32 | MSP432 |
|---|---|
| P3.3 TX | GPIO_14 RX |
| P3.2 RX | GPIO_12 TX |
- Worked on the ESP32 code to capture the Lava Lamp's photo.
- Serial communication between the ESP32 and the MSP432.
- Worked on the Telegram bot hosted on the ESP32.
- Encrypted and decrypted messages using the seeds generated by the ESP32.
- Worked on the MSP432 code of the LCD display.

