This is the firmware used in TecnoClub Elburgo's CanSat during CanSat 2024-2025.
Hardware components used in this project:
- Teensy® 4.1 Development Board
- Ai-Thinker SX1278 LoRa Ra-01 433MHz v4.0 breakout
- BlueDot BME280 + TSL2591 Advanced Weather Station
- ST7789 GMT130-V1.0 IPS 240*240
| SX1278 | BME280 + TSL2591 | ST7789 | Teensy 4.1 |
|---|---|---|---|
| 3V3 | VCC | VCC | 3V |
| GND | GND | GND | G |
| Pin 0 | |||
| Pin 1 | |||
| IO0 | Pin 2 | ||
| Pin 3 | |||
| Pin 4 | |||
| Pin 5 | |||
| Pin 6 | |||
| Pin 7 | |||
| DC | Pin 8 | ||
| RES | Pin 9 | ||
| NSS | Pin 10 | ||
| MOSI | Pin 11 | ||
| MISO | Pin 12 | ||
| SCK | Pin 13 | ||
| Pin 14 | |||
| Pin 15 | |||
| Pin 16 | |||
| Pin 17 | |||
| SDA | Pin 18 | ||
| SCL | Pin 19 | ||
| Pin 20 | |||
| Pin 21 | |||
| Pin 22 | |||
| Pin 23 | |||
| Pin 24 | |||
| Pin 25 | |||
| SDA | Pin 26 | ||
| SCK | Pin 27 | ||
| Pin 28 | |||
| Pin 29 | |||
| Pin 30 | |||
| Pin 31 | |||
| Pin 32 | |||
| Pin 33 | |||
| Pin 34 | |||
| Pin 35 | |||
| Pin 36 | |||
| Pin 37 | |||
| Pin 38 | |||
| Pin 39 | |||
| Pin 40 | |||
| RST | Pin 41 |
You can find the pre-compiled .hex firmware files for Teensy 4.1 in the Releases tab
of this repository. These files are ready for use and do not require additional compilation.
The latest release can be found in the Releases tab.
.hex files can be uploaded to a Teensy 4.1 board using the Teensy Loader Application.
The firmware depends on:
PlatformIO automatically resolves and installs project dependencies when you build, debug, or test a project. If you want to install project dependencies manually, please use PlatformIO Core (CLI) and the pio pkg install command.
This repository uses some of the example code provided by the libraries listed above.
To get started with this project, you can either clone the repository or download it as a .zip file:
Clone the repository:
Ensure that Git is installed on your system.
Open a terminal and run the following command:
git clone https://github.com/TecnoclubCansat/2025-CanSat-Firmware.git
This will create a local copy of the repository, which is prefered for contributing.
Download as a .zip File:
- Navigate to the Code button at the top of the repository's GitHub page.
- Select Download ZIP to download the project files.
- Extract the downloaded
.zipfile to your desired location.
- Open PlatformIO IDE.
- In PlatformIO, go to Open Project.
- Navigate to the folder where the repository was cloned or extracted and select it.
- PlatformIO will automatically detect the
platformio.inifile in the root directory and configure the project. - Build, upload, or test the project as needed!
This repository is set up with tools that assist in development by automatically formatting code, enforcing standards, and fixing issues where possible.
For these tools to run automatically before committing, pre-commit has to be installed. This can be done in a virtual environment in order to maintain a cleaner development setup. Using a virtual environment isolates dependencies, ensuring they don't conflict with other projects.
The following steps explain how to install pre-commit in a Python virtual environment.
Ensure Python is installed in your system.
You can check your version of Python with the following command:
python --version
Create a Python virtual environment.
To make a virtual environment of name
.venvin the current directory, run:python -m venv .venv
Activate the virtual environment.
On Windows, run:
.\.venv\Scripts\activate
On Linux or macOS, run:
source .venv/bin/activate
To avoid repeating this step every time a terminal is opened in this directory, configure your IDE to use the
.venvvirtual environment as the default interpreter. In Visual Studio Code, this can be done by opening the command palette, typingPython: Select Interpreterand selecting the.venvvirtual environment.Install pre-commit.
This can easily be achieved by executing:
pip install pre-commit
After installing
pre-commit, the necessary hooks are installed on the nextgit commitor the next timepre-commit runis executed.