Skip to content

Instantly share code, notes, and snippets.

@hephaestus9
hephaestus9 / Beep.asm
Last active December 5, 2015 20:15
RTTTL Player in ASM
; CIS-261
; Here is a song to past in d=4,o=5,b=250:e,8p,8f,8g,8p,1c6,8p.,d,8p,8e,1f,p.,g,8p,8a,8b,8p,1f6,p,a,8p,8b,2c6,2d6,2e6,e,8p,8f,8g,8p,1c6,p,d6,8p,8e6,1f.6,g,8p,8g,e.6,8p,d6,8p,8g,e.6,8p,d6,8p,8g,f.6,8p,e6,8p,8d6,2c6,q
; 'Indiana Jones'
; Some code taken from Lab M09 demo program: make_beeps.asm
; Lab M09, http://www.c-jump.com/bcc/c261c/MLabs/M09arrays/lecture.html Data Arrays and Windows API Calls
;
; Reference http://www.benchmark-companies.com/electronics/elt265/handouts/wam_ch8.pdf
; Reference https://github.com/ponty/arduino-rtttl-player/blob/master/rtttl/rtttl.h
@hephaestus9
hephaestus9 / ironworks.wsgi
Created March 22, 2015 15:00
/var/www/Ironworks/ironworks.wsgi
#!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/Ironworks/")
from Ironworks import app as application
application.secret_key = 'This is my secret - get your own'
@hephaestus9
hephaestus9 / 000-default.conf
Last active October 15, 2023 10:40
/etc/apache2/sites-available/000-default.conf
#**REMEMBER TO SAVE A BACK-UP OF THE ORIGINAL 000-default.conf!!!
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
@hephaestus9
hephaestus9 / depth_sensor.ino
Last active July 27, 2018 12:40
Depth Sensor Code - modified j.brian
/*
created August 2011
by SMStrauch and with help of robtillaart and ulrichard. Thanks!
Manufacturer: www.intersema.ch
Source: http://www.meas-spec.com/downloads/Using_SPI_Protocol_with_Pressure_Sensor_Modules.pdf
Source: http://forum.arduino.cc/index.php?topic=67188.0
Datasheet: http://media.digikey.com/pdf/Data%20Sheets/Measurement%20Specialties%20PDFs/MS5541-CM.pdf
Modified 2-10-2015 J.Brian
/*
MS5541 Pressure Sensor calwords readout
This program will read your MS5441 or compatible pressure sensor every 5 seconds and show you the calibration words, the calibration factors,
the raw values and the compensated values of temperature and pressure.
Once you read out the calibration factors you can define them in the header of any sketch you write for the sensor.
Pins:
MS5541 sensor attached to pins 10 - 13:
MOSI: pin 11
@hephaestus9
hephaestus9 / Stellaris_Launchpad_Sensor_Board.ino
Created February 15, 2015 13:17
Sensor Board - Stellaris Launchpad
/***************************************************************************************************************
* Razor AHRS Firmware v1.4.2
* 9 Degree of Measurement Attitude and Heading Reference System
* for Sparkfun "9DOF Razor IMU" (SEN-10125 and SEN-10736)
* and "9DOF Sensor Stick" (SEN-10183, 10321 and SEN-10724)
*
* Released under GNU GPL (General Public License) v3.0
* Copyright (C) 2013 Peter Bartz [http://ptrbrtz.net]
* Copyright (C) 2011-2012 Quality & Usability Lab, Deutsche Telekom Laboratories, TU Berlin
@hephaestus9
hephaestus9 / BBB_Code.py
Last active August 29, 2015 14:15
BBB Code
# -*- coding: utf-8 -*-
# J.Brian 1-22-2015
import Adafruit_BBIO.UART as uart
import socket
import serial
import threading
import ast
import time
from random import randint
@hephaestus9
hephaestus9 / gist:905910819e97994cb578
Created February 7, 2015 16:14
Setup to run ROV.py
For this program I highly recommend the use of 'Guake', additionally for proper display I recommend Opera beta on a 64bit ubuntu install
http://www.opera.com/computer/beta
sudo apt-get install guake
start guake press F12 for terminal window
sudo apt-get install build-essential python-dev python-setuptools python-pip
@hephaestus9
hephaestus9 / Stellaris_Launchpad_Motor_Driver.ino
Last active August 29, 2015 14:13
Code to drive motor controllers, and other misc.
//J.Brian 1-22-2015
// inputString format:
// vert, port, stbd, aux1, aux2, aux3
#include <SerialBuffer.h>
// change this to Serial1 etc if you're using an Arduino Mega
#define SERIAL_PORT Serial
#define BUFFER_SIZE 64
@hephaestus9
hephaestus9 / Motor_Control_Port.ino
Last active August 29, 2015 14:13
Code for Port 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