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
//written for teensy, if using on a non-teensy platform, you must include #include <elapsedMillis.h> http://playground.arduino.cc/Code/ElapsedMillis | |
#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc. | |
#include "Adafruit_LEDBackpack.h" | |
#include "Adafruit_GFX.h" | |
#include "pitches.h" | |
#include "tones.h" | |
#define startPin 9 | |
#define finishPin 10 |
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
class NerdyTimer | |
{ | |
//declare pins for solar panels that are part of laser trip wire | |
int startPin; | |
int stopPin; | |
//values that determine if the laser has been tripped or not | |
int startPinThreshhold; | |
int stopPinThreshhold; | |
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 <Wire.h> // Enable this line if using Arduino Uno, Mega, etc. | |
#include "Adafruit_LEDBackpack.h" | |
#include "Adafruit_GFX.h" | |
#include "NerdyTimer.h" | |
// set pin numbers | |
const int resetButtonPin = A6; //reset pin for all tracks | |
//define start pin, stop pin, and i2c address for 7-segment display | |
NerdyTimer track_1(A0,A1,0x71); |
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
import math | |
def setup(): | |
size(500, 500,P3D) | |
smooth() | |
noStroke() | |
background(200, 100, 90) | |
def draw(): | |
_iter=10 |
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
from random import random | |
x_size=800 | |
y_size=300 | |
x_itr=16 | |
y_itr=20 | |
def setup(): | |
size(x_size,y_size) |
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
from random import random | |
def setup(): | |
size(400,400) | |
def draw(): | |
jump=1 | |
for y in range(0,height,2): | |
for x in range(0,width,jump): | |
seed = random() |
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
#reference: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ | |
from bs4 import BeautifulSoup | |
import requests | |
import csv | |
def write_to_csv(data,file_name): #reference: http://pymotw.com/2/csv/ | |
with open(file_name,'w') as f: #existing file with the same name will be overwritten | |
writer = csv.writer(f) | |
for i in range(len(data)): | |
if data[i]: |