This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tStart = (unsigned) millis(); | |
} | |
break; | |
// look for the echo back | |
case READ: | |
// see if we got anything to read | |
if((cbRead = tcpClient.available()) > 0) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import * | |
from math import log | |
from Tkinter import Tk | |
from tkFileDialog import * | |
import csv | |
H = 500 | |
iterations = 30 | |
ColorList = [] |