This file contains 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 <GP2Y0A02YK0F.h> | |
GP2Y0A02YK0F irSensor; | |
int distance; | |
void setup() | |
{ | |
Serial.begin(9600); | |
irSensor.begin(A0); // Assign A0 as sensor pin | |
} |
This file contains 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
# http://www.nruns.com/_downloads/advisory28122011.pdf | |
# http://bugs.python.org/issue13703 | |
import sys | |
import string | |
import itertools | |
# hash function used by python string object | |
def hash(s): | |
slen = len(s) |