Skip to content

Instantly share code, notes, and snippets.

/* =============================================================================
LIDAR-Lite v2: Change the I2C address of multiple sensors with PWR_EN line
This example demonstrates how to chage the i2c address of multiple sensors.
The library is in BETA, so subscribe to the github repo to recieve updates, or
just check in periodically:
https://github.com/PulsedLight3D/LIDARLite_v2_Arduino_Library
To learn more read over lidarlite.cpp as each function is commented
/*
ofxFaceTracker provides an interface to Jason Saragih's FaceTracker library.
getImagePoint()/getImageMesh() are in image space. This means that all the
points will line up with the pixel coordinates of the image you fed into
ofxFaceTracker.
getObjectPoint()/getObjectMesh() are in 3d object space. This is a product of
the mean mesh with only the expression applied. There is no rotation or
translation applied to the object space.
#include "ofMain.h"
#include "ofApp.h"
#include "ofAppGlutWindow.h"
//========================================================================
int main( ){
ofAppGlutWindow window;
ofSetupOpenGL(&window, 1200,1200, OF_WINDOW); // <-------- setup the GL context
(null): "ofLogNotice::ofLogNotice(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
(null): "ofLog::ofLog(ofLogLevel, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
(null): "void ofDrawBitmapString<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, float, float, float)", referenced from:
(null): "ofEnableAlphaBlending()", referenced from:
(null): "ofLogError::ofLogError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
(null): "ofCircle(ofVec3f const&, float)", referenced from:
(null): "ofLog::~ofLog()", referenced from:
(null): "ofSetColor(int, int, int, int)", referenced from:
(null): "ofDisableAlphaBlending()", referenced from:
(null): "ofSetColor(int)", referenced from:
#include "rotaryencoder.h"
int rotaryencoder::counterValue;
bool rotaryencoder::A_set;
bool rotaryencoder::B_set;
rotaryencoder::rotaryencoder(int _a, int _b) {
encoderPinA = _a;
encoderPinB = _b;
--config nightly shutdown time
set shutdown_hour to 23
set shutdown_min to 35
set shutdown_sec to 0
global shutdown_time
set shutdown_time to shutdown_hour * 60 * 60 + shutdown_min * 60 + shutdown_sec
--config screen arrangement adjust
global posixDisplayFixPath
set posixDisplayFixPath to "/Applications/of_v0.9.0RC1_osx_release/addons/ofxDisplayLayout/displayFix/bin/displayFix.app"
HOST_OS=Linux
HOST_ARCH=armv7l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123
Compiling OF library for Release
make[1]: Entering directory '/home/pi/of_v0.9.0_linuxarmv7l_release/libs/openFrameworksCompiled/project'
HOST_OS=Linux
HOST_ARCH=armv7l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123
HOST_OS=Linux
HOST_ARCH=armv7l
################################################################################
# CONFIGURE PROJECT MAKEFILE (optional)
# This file is where we make project specific configurations.
################################################################################
################################################################################
# OF ROOT
# The location of your root openFrameworks installation
# (default) OF_ROOT = ../../..
################################################################################
HOST_OS=Linux
HOST_ARCH=armv7l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123
[warning] ofAppEGLWindow: init(): X11 not availble on RPI yet, using a native window instead
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1600x1200
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1280x720
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1
[notice ] ofAppEGLWindow: createSurface(): no current renderer selected
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
2016-02-04 09:45:01,278 WARN [context] Hold on to yer butts
2016-02-04 09:45:01,278 INFO [context] configuration path: /Applications/of_v0.9.0_osx_release/addons/ofxOrbbecAstra/example/bin/astra.toml
2016-02-04 09:45:01,278 INFO [context] log file path: astra.log
2016-02-04 09:45:01,278 INFO [context] plugin path: /Applications/of_v0.9.0_osx_release/addons/ofxOrbbecAstra/example/bin/Plugins/
2016-02-04 09:45:01,282 INFO [orbbec.ni.oni_adapter_plugin] Initializing OpenNI v2.3.0.15
2016-02-04 09:45:01,359 INFO [orbbec.ni.oni_adapter_plugin] device connected: 2bc5/0403@20/12
2016-02-04 09:45:01,359 INFO [astra.plugin_service] creating streamset: device/sensor0 100c60
2016-02-04 09:45:01,359 INFO [orbbec.ni.device_streamset] opening device: 2bc5/0403@20/12
2016-02-04 09:45:01,408 INFO [orbbec.ni.device_streamset] opened device: 2bc5/0403@20/12
2016-02-04 09:45:01,408 INFO [astra.plugins.Stream] creating a 2, 0