Skip to content

Instantly share code, notes, and snippets.

View LaserBorg's full-sized avatar
🐍

Philip Gutjahr LaserBorg

🐍
View GitHub Profile
@LaserBorg
LaserBorg / curve_fitting.py
Created March 27, 2024 18:51
estimating the linear relation between PWM duty cycle and angular velocity for LDRobot Lidar LD06, LD19 or STL-27L
'''
fitting a linear function to PWM vs. Speed measurements of LDRobot Lidar
works with LD06,
TODO: PWM cannot control STL27L for some reason.
'''
import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
@LaserBorg
LaserBorg / rectify_from_inclination.py
Created June 2, 2023 21:32
Rectify Image using Pitch and Roll angles
'''
https://stackoverflow.com/questions/20445147/transform-image-using-roll-pitch-yaw-angles-image-rectification/20469709#20469709
'''
import cv2
import numpy as np
# CORNERS FROM 3D ROTATION AND PROJECTION TO SCREENSPACE
def screenspace_from_3D(image_width, image_height, diagonal_fov, camera_position, pitch, roll, points_3d, pixel_units=True):
@LaserBorg
LaserBorg / lame.py
Created January 22, 2022 20:52 — forked from psobot/lame.py
Asynchronous MP3 encoding in Python
from Queue import Queue
import subprocess
import threading
import traceback
import logging
import time
log = logging.getLogger(__name__)
"""
@LaserBorg
LaserBorg / code.py
Created January 17, 2022 23:39 — forked from idriszmy/code.py
Interface RFid RC522 Reader using Maker Pi Pico and CircuitPython
"""
Interface RFid RC522 Reader using Maker Pi Pico and CircuitPython
https://tutorial.cytron.io/2022/01/11/interface-rfid-rc522-reader-using-maker-pi-pico-and-circuitpython/
Items:
- Maker Pi Pico
https://my.cytron.io/p-maker-pi-pico
- Mifare RC522 RFID Kit
https://my.cytron.io/p-mifare-rc522-rfid-kit
- Grove - Relay