Skip to content

Instantly share code, notes, and snippets.

View ukicomputers's full-sized avatar
🐧
May the Linux Kernel be with you

Uglješa Lukešević ukicomputers

🐧
May the Linux Kernel be with you
View GitHub Profile
@ukicomputers
ukicomputers / CMakeLists.txt
Created December 23, 2023 17:04
LibSerial project example CMake
cmake_minimum_required(VERSION 3.8)
project(serial)
find_package(PkgConfig)
pkg_check_modules(SERIAL libserial)
add_executable(${PROJECT_NAME} main.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC ${SERIAL_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC ${SERIAL_LDFLAGS})
// Fully working code for reading from serial port in Linux
// Tested on STM32F437ZG
#include <libserial/SerialPort.h>
#include <iostream>
using namespace LibSerial;
int main() {
SerialPort serial;
@ukicomputers
ukicomputers / opencv.sh
Last active March 16, 2024 13:21
All required libaryes for OpenCV on Linux
sudo apt install build-essential
sudo apt install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt install ffmpeg
git clone https://github.com/opencv/opencv.git
mkdir opencv-build
cd opencv-build
cmake ../opencv
make -j$(nproc)
sudo make install