Skip to content

Instantly share code, notes, and snippets.

#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "chilitags/chilitags.hpp"
#include <iostream>
using namespace std;
using namespace cv;
OK, datasheet says:
2.35V at 34 mA for the heater
So assuming you want to power it off 5V, you want the voltage drop across the resistor to be 2.65V (5-2.35). The current through the resistor will be the same as through the heater since they're in series so:
V=IR
2.65=0.034*R
R = 2.65/0.034 = 78 Ohms
The resistor for sensing can be anything above 1k, I reccomend starting with about 10K.
tStart = (unsigned) millis();
}
break;
// look for the echo back
case READ:
// see if we got anything to read
if((cbRead = tcpClient.available()) > 0)
{
################################################################################
# Copyright (C) 2012-2013 Leap Motion, Inc. All rights reserved. #
# Leap Motion proprietary and confidential. Not for distribution. #
# Use subject to the terms of the Leap Motion SDK Agreement available at #
# https://developer.leapmotion.com/sdk_agreement, or another agreement #
# between Leap Motion and you, your company or other organization. #
################################################################################
import Leap, sys, thread, time, os
from math import ceil
def map_x(i):
a= int((i - XLEFT) / (1.0 * (XRIGHT - XLEFT)) * 100)
if (a<0):
return 0
if (a>99):
return 99
return a
def map_y(i):
a = int((-i + YTOP) / (1.0 * (YTOP - YBOTTOM)) * 50)
@tomhartley
tomhartley / gist:4209227
Created December 4, 2012 21:58
Count word lengths
from collections import *
def countWordLength(txt):
count = collections.Counter()
words = txt.split()
for word in words:
count[len(word)]+=1
return count
text = raw_input("Enter your text here yo: ")
@tomhartley
tomhartley / gist:791228
Created January 22, 2011 16:38
Generates and renders the Mandelbrot Set using the matplotlib library
from pylab import *
from math import log
from Tkinter import Tk
from tkFileDialog import *
import csv
H = 500
iterations = 30
ColorList = []