RT-Thread born in 2006, it’s an open-source, neutral, and community-based real-time operating system (RTOS). The software has the characteristics of very low resource occupancy, high reliability, and high scalability, can be greatly used in sensing nodes, wireless connection chips and many resource-constrained scenes, also widely applied in gateway, IPC, smart speakers, and many other high-performance applications.
RT-Thread is also considered as an IoT platform with its rich middle-tier components and great hardware and software ecosystem, with almost every key basic component required for IoT devices, such as network protocols, file systems, low power management, etc. It supports all mainstream compiling tools such as GCC, Keil, IAR, etc., and a variety of standard interfaces, such as POSIX, CMSIS, C++ application environment, Micropython, and Javascript, easy for developers to port a wide range of applications. RT-Thread also offers great commercial support to all the mainstream CPU architectures such as ARM Cortex-M/R/A, RISC-V, MIPS, X86, Xtensa, etc.
RT-Thread Features✅Designed for resource-constrained devices, the minimum kernel requires only 1.2KB of RAM and 3 KB of Flash.
✅A variety of standard interfaces, such as POSIX, CMSIS, and C++ application environments.
✅Has rich components and a prosperous and fast-growing package ecosystem.
✅Elegant code style, easy to use, read and master.
✅High Scalability. RT-Thread has high-quality scalable software architecture, loose coupling, and modularity and is easy to tailor and expand.
✅Supports high-performance applications.
✅Supports all mainstream compiling tools such as GCC, Keil, and IAR.
✅Supports a wide range of architectures and chips.
Hardware and Software Components✅Computer/Laptop
✅USB Type-C Cable (Not a Power Cable)
I. Installation Procedure of the RT-Thread StudioA. System RequirementsBefore starting the installation process, make sure your computer meets the system requirements for RT-Thread Studio IDE. Typically, these requirements include:
✅Operating System: Windows, Linux, or macOS
✅RAM: 4GB or higher recommended
✅Disk Space: Several GB of free space
✅Java Runtime Environment (JRE) installed (preferably version 8 or later)
Please be guided that in this procedure, we will be using a Windows 11 Operating System.
B. Download and Install RT-Thread Studio IDE1. Click the provided link to proceed to the download page of the RT-Thread Studio IDE.
Download page link: RT-Thread | Download2.
Open the downloaded installer or .exe file and follow the instructions provided there.3. Wait until the installation is done. Once the installation is done, you can now use the RT-Thread Studio IDE.
II. Create and Upload a New RT-Thread Project to the Vision Board1. Open the RT-Thread Studio.
2. Click SDK Manager. Install the “Reneses -> VISION-BOARD"(version 1.3) and "Debugger_Support_Package -> PyOCD"(version 0.2.0 to 0.2.3) packages. After the installation, close the SDK Manager.
3. Click on the “File” tab on the upper left portion of the RT-Thread Studio then click on the “New -> RT-Thread Project”.
4. Select “Base on Board”. On the board selection portion, select "VISION-BOARD" with type set to "Example". Any of the sixteen available examples will suffice. In my case, I selected the vision_board_openmv since I will be using OpenMV for my application. Moreover, kindly fill up the project name according to your preference. And once done, click the finish button.
5. Compile and build the project. In this step, you should be able to successfully build your project without problems.
6. Click the "Flash Download" button in between the "Window" and "Help" tab or press "CTRL+ALT+D" of the RT-Thread IDE to upload the project into your vision board. Please be patient as this could take a while.
7. Once the project is uploaded into the vision board, the firmware that will be used for OpenMV application will automatically be implemented.
Note: The newly purchased RT-Thread Vision Board is already pre-loaded with OpenMV firmware and can be used directly with OpenMV IDE without problems.
II. Create and Upload a New OpenMV Program to the Vision Board1. Open the OpenMV IDE.
2. Click on the “File” tab on the upper left portion of the OpenMV IDE, then click on the “New File”. It will automatically create an "untitled.py, " a simple program connecting your vision board and OpenMV IDE. Please save the file to your desired location.
4. Remove the USB-Type C from the vision board's "USB-DBG" and connect and transfer it connection to the "USB-OTG."
5. Click the "Connect button" located at the lower left of the OpenMV IDE to connect both the vision board and the OpenMV IDE. Once successfully connected, the "grey play button" will turn "green", indicating successful connectivity.
6. Click the "green play button" to run the first OpenMV program.
7. The attendance system using RT-Thread Vision Board will be created using "Haar Cascade Classifier algorithm" for face detection, which is a popular technique in computer vision, especially for detecting faces in real-time.
8. Click on the “File” tab on the upper left portion of the OpenMV IDE, then click on the “New File”. Rename the default "untitled.py" of the created program into desired file name for the attendance system or replace the code of the previously created OpenMV program file.
III. How the program worksThe micropython script attached to this tutorial is designed for the OpenMV Cam, performs face detection and saves an image when a face is detected. The images will be saved on an SD card attached to the RT-Thread Vision Board.
Image naming was considered for checking attendance. Each saved image will now have a filename similar to snapshot_2024-11-04_14-30-15.jpg or with a format YYYY-MM-DD_HH-MM-SS, which shows the specific date and time for easy reading and checking of attendance.
IV. Future works1. Create a self-hosted website for the attendance system using Flask or Django framework.
2. Send the recorded snapshots of the attendance system to the self-hosted website.
3. Create a more robust computer vision or machine learning model using Edge Impulse for face detection for the attendance system.
Comments
Please log in or sign up to comment.