Skip to content

Instantly share code, notes, and snippets.

View anisyanka's full-sized avatar
🌏

Aleksandr Anisimov anisyanka

🌏
  • Russia, Moscow
View GitHub Profile
@anisyanka
anisyanka / arm-cross-compiler_macos.md
Created March 19, 2025 21:02 — forked from disposedtrolley/arm-cross-compiler_macos.md
Installing the GNU ARM Embedded Toolchain for macOS

Introduction

The ARM Embedded Toolchain is a GNU licensed cross compiler for ARM CPU architectures, allowing you to compile C/C++ code into binaries which can execute on CPUs such as the Cortex-M line of microcontrollers.

When dealing with C/C++ embedded development, you have the choice of several compilers. Keil is probably the most well-known commercial brand in the embedded toolchain space. They have their own proprietary compiler and IDE which is quite popular for commercial applications (it's pricey and only runs on Windows).

SSH setup

WIFI setup

Show available networks

nmcli dev wifi list

# or
sudo iw dev wlan0 scan | grep SSID
@anisyanka
anisyanka / RPiWiFiFreeze.md
Created February 24, 2024 21:18 — forked from Paraphraser/RPiWiFiFreeze.md
Do your Raspberry Pi's Network Interfaces freeze? This may solve it.

Do your Raspberry Pi's Network Interfaces freeze?

My Raspberry Pi 4 kept losing its wlan0 interface. I could usually reconnect via Ethernet but, from time to time, I noticed that the eth0 interface would also go walkabout.

I tried a lot of things but the one described here seems to have cured the problem. I have no idea why it works. It just does.

Step 0 - are you a Windows user?

The script shown in the next step should be created on your Raspberry Pi. Please do not make the mistake of selecting the text, copying it into a text editor on your Windows machine, saving the file, and then moving the file to your Raspberry Pi. Unless you take precautions, Windows will add its 0x0d 0x0a (CR+LF) line endings and those will stop the script from working properly on your Raspberry Pi.

# It works fine for commit `master (Paulchen-Panther-5709d89e/bb40778a-1708095831)`.
# Install deps
sudo apt-get update
sudo apt-get install \
git \
cmake \
build-essential \
qtbase5-dev \
libqt5serialport5-dev \
@anisyanka
anisyanka / rpi_video.md
Last active February 23, 2024 13:11
RPI video stream camera how to

Install gstreamer

sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio

More info here - https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c

List video devices

0. Just check the camera was initialized with no errors

dmesg | grep 16MP
@anisyanka
anisyanka / stream_example.md
Created November 1, 2023 05:32 — forked from reinzor/stream_example.md
GStreamer UDP stream examples

MJPEG

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)

" See https://www.youtube.com/watch?v=XA2WjJbmmoM
" BASIC SETUP:
" enter the current millenium
set nocompatible
" enable syntax and plugins
syntax enable
@anisyanka
anisyanka / .vimrc
Last active November 22, 2020 20:44 — forked from rocarvaj/.vimrc
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development.
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
set nocompatible