Skip to content

Instantly share code, notes, and snippets.

@cyrildiagne
cyrildiagne / tiny85_esp8266_NeoPixelStrip.ino
Created November 20, 2014 13:16
NeoPixel Strip + ATTiny85 + ESP8266
#include <SoftwareSerial.h>
#include <Adafruit_NeoPixel.h>
SoftwareSerial softSerial(3, 4); // RX, TX
#define BUFFER_SIZE 50
@cyrildiagne
cyrildiagne / boitier.scad
Created October 25, 2014 18:35
Portée/ - 3d printed case v1
//box length
length = 104;
//breadth
breadth = 30;
//box height
height = 30;
// top height
@cyrildiagne
cyrildiagne / portee.ino
Created October 25, 2014 18:33
ATTiny Sketch for Portée/ modules
#include <SoftwareSerial.h>
#define DST_IP "192.168.1.2"
#define DST_PORT 8888
SoftwareSerial serial(3, 4); // RX, TX
int blinkPin = 0;
int vibrationDetectorPin = A1;
@cyrildiagne
cyrildiagne / addon_crawler.coffee
Created April 17, 2014 07:47
OpenFrameworks addons finder (NodeJS)
config = require '../config'
config.setEnvironment 'development'
fs = require 'fs'
path = require 'path'
colors = require 'colors'
github = require 'octonode'
client = github.client
id : config.GITHUB_CLIENT_ID
@cyrildiagne
cyrildiagne / map.coffee
Created November 27, 2013 21:31
zoom/pan animation test with google map js api
$(->
address_from = params['from']
address_to = params['to']
map = null
latlngFrom = null
latlngTo = null
animLatLng = null
currStatus = 'zoomOut'
intervalId = -1
@cyrildiagne
cyrildiagne / isPointInsideBox.cpp
Last active December 24, 2015 03:29
isPointInsideBox
inline bool isPointInsideBox(const ofPoint &p, ofBoxPrimitive& c){
ofPoint tp = p - c.getPosition();
tp = tp * c.getGlobalTransformMatrix().getInverse().getRotate();
if (fabs(tp.x) > c.getWidth()*0.5
|| fabs(tp.y) > c.getHeight()*0.5
|| fabs(tp.z) > c.getDepth()*0.5){
return false;
}
return true;
}
@cyrildiagne
cyrildiagne / openni_osc_blender.py
Created July 9, 2013 08:08
Blender motion capture with OpenNI (via OSC)
import bpy
from mathutils import Vector
from mathutils import Quaternion
from bpy.types import ToolSettings
from OSC import OSCServer
import types
# this method of reporting timeouts only works by convention
# that before calling handle_request() field .timed_out is
# set to False
@cyrildiagne
cyrildiagne / CMakeLists.txt
Last active June 12, 2018 01:32
3D Object tracking with PCL
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(correspondence_grouping_openni)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin/")
set(PCL_DIR "/Users/kikko/Dev/kinect/pcl/pcl-trunk/build/")
find_package(PCL 1.5 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
@cyrildiagne
cyrildiagne / .zshrc
Created May 26, 2013 12:23
My .zshrc
# DESCRIPTION:
# A simple zsh configuration that gives you 90% of the useful features that I use everyday.
#
# AUTHOR:
# Geoffrey Grosenbach http://peepcode.com
############
# FUNCTIONS
############
@cyrildiagne
cyrildiagne / RailsAppTest.hx
Last active December 16, 2015 21:39
Haxe Test App for a Rails JSON API (with Devise register / login) - (only tested with Flash output)
package;
import flash.display.Shape;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.external.ExternalInterface;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;