Skip to content

Instantly share code, notes, and snippets.

View rfvermut's full-sized avatar

Pavels Veretennikovs rfvermut

  • RiskFocus
  • Riga, Latvia
View GitHub Profile
@rfvermut
rfvermut / main.c
Created May 31, 2023 09:03
Pico GPIO Tester
#define LED_BUILTIN 13
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
// Устанавливаем все пины, кроме LED_BUILTIN, как INPUT_PULLUP
for(int i = 0; i < 20; i++) {
if(i != LED_BUILTIN){
pinMode(i, INPUT_PULLUP);
}
@rfvermut
rfvermut / tester.py
Last active February 21, 2023 13:57
OpenMower automated testing script
#!/usr/bin/env python3
import shlex, subprocess
import rospy
import time
from mower_msgs.msg import Status
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Imu, MagneticField
last_status: Status = None
@rfvermut
rfvermut / ModbusSlave.h
Created May 14, 2022 19:11
ESPHome custom module to expose GPIO pins as modbus slave coils
/**
* Modified from the following software by Pavels Veretennikovs
* Copyright (c) 2015, Yaacov Zamir <kobi.zamir@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@rfvermut
rfvermut / KTWKQ03ES_parameters.md
Last active October 25, 2022 08:56
Aqara EigenStone Thermostat S2 (KTWKQ03ES) manual appendix: parameter names and values (Google translated from Chinese)
@rfvermut
rfvermut / gist:bf071388fd43ae45fb1a1166270eb02a
Last active July 26, 2019 11:21
🐉: Введение

Мир

Тема - человечьи попаданцы в фэнтези мир, стандартное фентези эльфы-орки-дварфы.

Поверхность, небольшие города, море. Не будет длительных лесов-болот-гор, не будет подземного мира. Возможно что-то уровня "спуститься в метро".

Персонажи

@rfvermut
rfvermut / add_swap.sh
Created December 10, 2018 15:11
Creates swap as a file in Linux
#!/bin/sh
# Author: https://github.com/chetankapoor/swap
# Checking if user is root otherwise throw error
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi