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 <ht1632.h> | |
#include <MHV_io_ArduinoDuemilanove328p.h> | |
HT1632 matrix = HT1632( MHV_ARDUINO_PIN_4,MHV_ARDUINO_PIN_8,MHV_ARDUINO_PIN_10,MHV_ARDUINO_PIN_9, HT1632::pmos_8commons ); | |
void setup() { | |
digitalWrite(4, HIGH); | |
Serial.begin(9600); | |
matrix.set_mode( HT1632::read_mode ); | |
matrix.send_address( 0 ); |
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
/* | |
Conway's Game of Life modeled in Verilog by Adam Thomas / devdsp | |
*/ | |
/* | |
* ---------------------------------------------------------------------------- | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* <github.com/devdsp> wrote this file. As long as you retain this notice you | |
* can do whatever you want with this stuff. If we meet some day, and you think | |
* this stuff is worth it, you can buy me a beer in return. - Adam |
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
jQuery.fn.sortElements = (function(){ | |
var sort = [].sort; | |
return function(comparator, getSortable) { | |
getSortable = getSortable || function(){return this;}; | |
var placements = this.map(function(){ | |
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 Image | |
width, height = 128,512 | |
im = Image.new("RGB", (width,height) ) | |
objective_influence = [[]]*width*height; | |
def main(): |
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> | |
void setup() | |
{ | |
Wire.begin(); | |
} | |
void loop() | |
{ | |
Wire.beginTransmission(0x21); | |
Wire.write("A"); |
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 <TinyWireM.h> | |
#define HMC5883L 0x1E //0011110b, I2C 7bit address of HMC5883 | |
void pulse(int n){ | |
while(n-- > 0) { | |
digitalWrite(1,HIGH); | |
delay(1); | |
digitalWrite(1,LOW); | |
delay(1); | |
} |
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 <string.h> | |
#include <Ethernet.h> | |
#include <SPI.h> | |
#include <HttpClient.h> | |
#include <EthernetClient.h> | |
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xE0, 0xFE, 0xED }; | |
char server[] = "morphia.mhv"; |
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/perl | |
use strict; | |
use warnings; | |
my ($minx,$miny,$maxx,$maxy); | |
while(<>) { | |
chomp; | |
foreach my $cmd (split/;/) { |
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 | |
from PythonMagick import Image, Color | |
from math import atan2, pi, pow,sqrt | |
img = Image('128x128', 'white') | |
xo = img.columns() / 2 | |
yo = img.rows() / 2 | |
for x in range(img.columns()): | |
for y in range(img.rows()): |
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
devdsp: | |
name: Adam Thomas | |
twitter: dev_dsp |
OlderNewer