Skip to content

Instantly share code, notes, and snippets.

/*
http://pulsedlight3d.com
This sketch demonstrates getting distance from multiple LIDAR-Lite sensors by enabling the Power Enable line of the sensor
to read from, and disabling the others.
It utilizes the 'Arduino I2C Master Library' from DSS Circuits:
http://www.dsscircuits.com/index.php/articles/66-arduino-i2c-master-library
You can find more information about installing libraries here:
http://arduino.cc/en/Guide/Libraries
*/
@antimodular
antimodular / gist:8ef108e3525e26311482
Created March 25, 2015 01:51
PTZ Active Camera Model
_focalLength = 60;
cout<<"_panAngle "<<_panAngle<<" "<<_tiltAngle<<endl;
float phi = _tiltAngle; //φ
float changeInPan;//δθ delta theta
float changeInTilt;//δφ
for(int x=0; x< sixt.getWidth(); x+=10){
@antimodular
antimodular / gist:505fb536b086a66e3590
Created March 25, 2015 01:54
print out PTZ model
myFBO 1024 576
_panAngle 0.5 10
x y 0 , 0
a 92.5411
b -170.106
t -0
bigA 92.5411
changeInPan -0
changeInTilt 0
openFrameworksLib project Group
/Applications/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj
/Applications/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj Update to recommended settings
gpu project Group
/Applications/of_v0.8.4_osx_release/apps/myApps/gpu/gpu.xcodeproj
/Applications/of_v0.8.4_osx_release/apps/myApps/gpu/gpu.xcodeproj Update to recommended settings
openFrameworks Group
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/utils/ofSystemUtils.cpp
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/utils/ofSystemUtils.cpp:266:35: 'alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:' is deprecated: first deprecated in OS X 10.10 - Use -init instead
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/gl/ofTexture.cpp
openFrameworksLib project Group
/Applications/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj
/Applications/of_v0.8.4_osx_release/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj Update to recommended settings
openFrameworks Group
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/utils/ofSystemUtils.cpp
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/utils/ofSystemUtils.cpp:266:35: 'alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:' is deprecated: first deprecated in OS X 10.10 - Use -init instead
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/gl/ofTexture.cpp
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/gl/ofTexture.cpp:567:5: 'gluBuild2DMipmaps' is deprecated: first deprecated in OS X 10.9 - "Use glGenerateMipmap"
/Applications/of_v0.8.4_osx_release/libs/openFrameworks/gl/ofTexture.cpp:570:5: 'gluBuild2DMipmaps' is deprecated: first deprecated in OS X 10.9 - "Use glGenerateM
[ error ] ofShader: setupShaderFromSource(): GL_VERTEX_SHADER shader failed to compile
[ error ] ofShader: GL_VERTEX_SHADER shader reports:
ERROR: 0:2: '' : version '330' is not supported
ERROR: 0:2: '' : syntax error: #version
ERROR: 0:24: ';' : syntax error: Uniform blocks may not have identifiers in GLSL 140
[ error ] ofShader: setupShaderFromSource(): GL_FRAGMENT_SHADER shader failed to compile
[ error ] ofShader: GL_FRAGMENT_SHADER shader reports:
ERROR: 0:1: '' : version '330' is not supported
ERROR: 0:1: '' : syntax error: #version
***** VIDEOINPUT LIBRARY - 0.2000 - TFW2013 *****
[notice ] ofDirectShowGrabber: initGrabber(): choosing 0
SETUP: Setting up device 0
SETUP: FaceTime HD Camera (Built-in)
SETUP: Couldn't find preview pin using SmartTee
SETUP: Default Format is set to 640 by 480
SETUP: trying requested format RGB24 @ 640 by 480
SETUP: trying format RGB24 @ 640 by 480
#include <DmxReceiver.h>
DmxReceiver DMX2 = DmxReceiver();
#define NUM_LEDS_USED 20
//---------------------------------------DMX-------------------------------------
volatile unsigned char dmx_data[NUM_LEDS_USED];
volatile unsigned char data;
Sensor 0x66: 295, Sensor 0x68: 258
Sensor 0x66: 294, Sensor 0x68: 1061
Sensor 0x66: 293, Sensor 0x68: 258
Sensor 0x66: 294, Sensor 0x68: 260
Sensor 0x66: 295, Sensor 0x68: 259
Sensor 0x66: 294, Sensor 0x68: 258
Sensor 0x66: 296, Sensor 0x68: 257
Sensor 0x66: 294, Sensor 0x68: 259
Sensor 0x66: 295, Sensor 0x68: 260
Sensor 0x66: 295, Sensor 0x68: 259
Sensor 0x66: 294, Sensor 0x68: 33
Sensor 0x66: 294, Sensor 0x68: 37
Sensor 0x66: 293, Sensor 0x68: 1061
Sensor 0x66: 296, Sensor 0x68: 33
Sensor 0x66: 295, Sensor 0x68: 32
Sensor 0x66: 294, Sensor 0x68: 33
Sensor 0x66: 294, Sensor 0x68: 35
Sensor 0x66: 1061, Sensor 0x68: 32
Sensor 0x66: 295, Sensor 0x68: 1061
Sensor 0x66: 293, Sensor 0x68: 33