Skip to content

Instantly share code, notes, and snippets.

@hephaestus9
hephaestus9 / Motor_Control_STBD.ino
Last active August 29, 2015 14:13
Code for Stbd side of ROV
//J.Brian 1-22-2015
// inputString format:
// vert, port, stbd, aux1, aux2, aux3
// Control -> Forward:
// DIO 4, PWM 5 -> Forward
// DIO 2, PWM 3 -> Reverse
// Slave Control 1 -> Vert:
// DIO 7, PWM 6 -> Up
@hephaestus9
hephaestus9 / SieveOfAtkin-Java.java
Last active June 13, 2017 14:50
Sieve Of Atkin - Java
/*
* The function of this class is to find all prime numbers in range given by the user.
*
* This homework assignment requires several references:
* http://www.avajava.com/tutorials/lessons/how-do-i-use-threads-join-method.html
* http://stackoverflow.com/questions/1428786/best-way-to-find-a-prime-number
* http://web.mit.edu/16.070/www/lecture/big_o.pdf
* http://en.wikipedia.org/wiki/Sieve_of_Atkin
* http://stackoverflow.com/questions/3790142/java-equivalent-of-pythons-rangeint-int
* http://stackoverflow.com/questions/17279519/removing-items-from-list-in-java
@hephaestus9
hephaestus9 / SieveOfAtkin.py
Last active August 29, 2015 14:09
Sieve Of Atkin
# -*- coding: utf-8 -*-
# algorithm from http://en.wikipedia.org/wiki/Sieve_of_Atkin
# written by J.Brian 11/17/2014
import math
import threading
class Sieve:
def __init__(self):
@hephaestus9
hephaestus9 / gist:d4945bc6eded584dafc2
Created October 4, 2014 20:55
Getting Microsoft LifeCam VX-500 working on BBB w/ Ubuntu 14.04
cd /opt/scripts/
sudo git pull
sudo ./tools/update_kernel.sh --beta-kernel
sudo reboot