Skip to content

Instantly share code, notes, and snippets.

View tfeldmann's full-sized avatar
🐕

Thomas Coenen tfeldmann

🐕
View GitHub Profile
import sys
import glob
import serial
def serial_ports():
"""Lists serial ports
:raises EnvironmentError:
On unsupported or unknown platforms
@tfeldmann
tfeldmann / circle_intersections.pde
Last active October 13, 2015 09:28
Find circle intersection points
PVector[] circleIntersections(PVector p1, float r1, PVector p2, float r2)
{
float d, a, h;
float dx, dy;
dx = p2.x - p1.x;
dy = p2.y - p1.y;
PVector dvect = new PVector(p1.x - p2.x, p1.y - p2.y);
d = dvect.mag();
@tfeldmann
tfeldmann / c-statemachine.c
Last active October 6, 2015 18:08
C - Statemachine
/**
* Erweiterte C-Statemachine
* Das Programm gibt folgendes aus:
*
* BEGIN: Es geht los. Ich initialisiere das Ganze.
* BEGIN: Es geht weiter in den Zustand ADDITION_SMALL
* BEGIN: Auf Wiedersehen!
* ADDITION_SMALL: Ich fange erst einmal mit kleinen Zahlen an.
* ADDITION_SMALL: Addiere Eins...
* ADDITION_SMALL: Addiere Eins...
@tfeldmann
tfeldmann / PDF-Extract.bat
Created May 29, 2012 12:43
PDF Extract - Extracts all PDF from a given Location while preserving the filetree (DKM)
:: Einstellungen
SET FOLDER_ROOT="..\CAD-DATEN"
SET FOLDER_CAD="CAD PDF"
SET FOLDER_PRODUCT="Produkt PDF"
SET PRODUCT_EXCLUDE_PREFIX=W-
:: ----------------------------------------------------------------------------------------------
:: | DO NOT TOUCH THE CODE BEHIND THIS LINE |
:: ----------------------------------------------------------------------------------------------