Skip to content

Instantly share code, notes, and snippets.

View madc's full-sized avatar

Matthias Esterl madc

View GitHub Profile
@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() )
@madc
madc / LICENSE
Last active February 21, 2022 07:33
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 / 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 / threadedCam.h
Created August 17, 2013 14:30
Import a picture from cam to ofImage when using a separate thread. (openFrameworks) Example: http://github.com/wirbrennen/ofxDocuApp
#ifndef _THREADED_CAM
#define _THREADED_CAM
#include "ofMain.h"
class threadedCam : public ofThread{
public:
ofVideoGrabber vidGrabber;
ofImage exportImage;
@madc
madc / testApp.cpp
Created August 27, 2013 20:27
Draw the current frame rate on the screen.
void testApp::draw(){
ofSetColor(0);
ofDrawBitmapString("FPS: " + ofToString((int)ofGetFrameRate()), 20, 20);
// [...]
}
#include <IRremote.h>
/*
Send infrared commands from the Arduino to the iRobot Roomba
by probono
2013-03-17 Initial release
@madc
madc / mine.ino
Created March 15, 2015 15:59
Arduino code for the Goldeneye 007 Remote Mine Prop (http://www.thingiverse.com/make:125687)
#include "pitches.h"
const int pinButton = 2;
const int pinSpeaker = 4;
const int pinLED[] = {3, 5, 6, 9, 10, 11};
boolean running = false;
volatile int mode = 0;
volatile unsigned long button_pressed = 0;
@madc
madc / PKGBUILD
Created September 1, 2015 21:18
PKGBUILD for jsoncpp 0.6.0rc2
pkgname=jsoncpp
pkgver=0.6.0rc2
_pkgver=0.6.0-rc2
pkgrel=1
pkgdesc='A C++ library for interacting with JSON'
url='https://github.com/open-source-parsers/jsoncpp'
license=('MIT' 'custom:Public_Domain')
arch=('i686' 'x86_64')
depends=('gcc-libs')
makedepends=('scons')
@madc
madc / archive
Created October 19, 2015 22:06
A little helper script to archive a BoltCMS installation
#!/usr/bin/env bash
# A little helper script to archive a BoltCMS installation
# Usage:
# Default behaviour:
# $ ./archive
# Restore:
# $ ./archive --restore <archive>
if [ $1 ] && [ $2 ]; then
# Maintainer: Francisco Martinez <zomernifalt at gmail dot com>
pkgname=makerbot-desktop
pkgver=3.8.0
_openmeshver=3.2_3.2
pkgrel=2
pkgdesc="A complete, free 3D printing solution for discovering, managing, and sharing your 3D prints."
arch=('x86_64')
url="https://www.makerbot.com/desktop"
license=('GPL')
depends=('boost' 'glibc>=2.4' 'hicolor-icon-theme' 'libdbus>=1.0.2' 'libgl' 'qt5-base>=5.3.0' 'qt5-webkit>=5.0.2' 'zenity' 'zlib>=1.1.4')