Skip to content

Instantly share code, notes, and snippets.

View madc's full-sized avatar

Matthias Esterl madc

View GitHub Profile
@madc
madc / testApp.cpp
Last active May 4, 2019 14:53
Find cam by device name instead of id. (openFrameworks)
string deviceName = "Logitech Camera";
vector<ofVideoDevice> devices = vidGrabber.listDevices();
for(vector<ofVideoDevice>::iterator it = devices.begin(); it != devices.end(); ++it) {
if(it->deviceName == deviceName) {
vidGrabber.setDeviceID(it->id);
break;
}
}
@madc
madc / LICENSE
Last active March 18, 2025 02:18
Simple morse en- & decoding for Arduino (including LED Example)Build after the specs on http://en.wikipedia.org/wiki/Morse_code
Copyright (c) 2015 Matthias Esterl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@madc
madc / ofClock.cpp
Created June 24, 2012 17:13
Analog Clock with openFrameworks
#include "ofClock.h"
ofClock::ofClock()
{
//Make everything looking nice and smooth.
ofSetCircleResolution(100);
ofEnableSmoothing();
//Set size & position of our clock
if( ofGetHeight() < ofGetWidth() )