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
#!/usr/bin/env python | |
import subprocess, sys | |
device = '/dev/sdc1' | |
label = 'beriberi' | |
tarball = 'rascal-filesystem-beriberi-2012-11-09.tar.gz' | |
commands = [ | |
'umount ' + device, |
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
set at91bootstrap "resized-boot-at91sam9g20-ek-serialflash2sdram.bin" | |
set bin ".bin" | |
set ubootprefix "u-boot-rm00" | |
#set uboot "$ubootprefix[lindex $argv 0]$bin" | |
set tf 35; # stupid hack because argv only works from command line | |
set uboot "$ubootprefix$tf$bin" | |
set kernel "linux-2.6.36-rascal-2011-11-02.bin" | |
set sourcedir "C:/Users/brandon/Desktop/My Dropbox/Rascal/Software/useful-binaries/" | |
puts "### PATHS FOR NEXT BURN ###" |
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
<p>The Rascal is currently <strong>sold out</strong>. A mildly revised PCB is in the works, and we'll have more Rascals in stock soon (perhaps around June 21, but these deadlines tend to slide).</p> | |
<p>If you might want to buy a Rascal in future, sign up for the announcement list (low traffic; you can unsubscribe).</p> | |
<!-- Begin MailChimp Signup Form --> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> | |
<script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.validate.js"></script> | |
<script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.form.js"></script> | |
<script type="text/javascript"> | |
// delete this script tag and use a "div.mce_inline_error{ XXX !important}" selector | |
// or fill this in and it will be inlined when errors are generated | |
var mc_custom_error_style = ''; |
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
[root@rascal14:/var/www/public/static/images]: python | |
Python 2.6.6 (r266:84292, Jun 18 2012, 19:18:49) | |
[GCC 4.3.3] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import cv | |
>>> im = cv.LoadImageM('rascal.png', 1) | |
>>> dst = cv.CreateImage(cv.GetSize(im), cv.IPL_DEPTH_16S, 3) | |
>>> laplace = cv.Laplace(im, dst) | |
>>> cv.SaveImage('rascal-laplace.png', dst) |
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
// Motor number 1 (Front) is 29 hex or 41 decimal | |
#include <Wire.h> | |
#include <AFMotor.h> | |
AF_DCMotor motor(4); | |
int x=0; | |
void setup() |
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
#!/usr/bin/python | |
# fastenal_convert.py | |
# Copyright 2008 Brandon Stafford | |
# | |
# This file is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. |
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
# command looks like: | |
# ssh -R *:8080:localhost:8080 [email protected] -N & | |
# | |
[autossh_tunnel] | |
enabled = 1 | |
ssh_keys = /home/root/.ssh/id_rsa | |
remote_host = rascalmicro.com | |
remote_username = root | |
port = 8000 |
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
# Mostly originally written by Richard Klancer. | |
# Licensed under MIT license: http://opensource.org/licenses/MIT | |
class Motor: | |
SERIAL_SPEED = 115200 | |
TIMEOUT_INTERVAL = 3 | |
def __init__(self): | |
import time |
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 flask import Flask, render_template, request | |
public = Flask(__name__) | |
@public.route('/sms', methods=['POST']) | |
def parse_sms(): | |
import pytronics | |
sender = request.form['From'] | |
message = request.form['Body'] | |
print 'SMS received from %s: %s' % (sender, message) |
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
def sendDMX(data): | |
import serial | |
# Make a DMX packet out of the data | |
dmxPacket = chr(0x00) + ''.join(chr(element) for element in data) | |
# To create sync signal (break and mark after break, in DMX-speak), | |
# slow port down and send a long 0 |
OlderNewer