Skip to content

Instantly share code, notes, and snippets.

//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
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;
#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);
from random import random
import math
x_size=800
y_size=40
x_itr=4
y_itr=4
def setup():
import math
def setup():
size(500, 500,P3D)
smooth()
noStroke()
background(200, 100, 90)
def draw():
_iter=10
from random import random
x_size=800
y_size=300
x_itr=16
y_itr=20
def setup():
size(x_size,y_size)
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()
#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]: