This is the embarrisingly simple code driving my Nixie clock
TODO: add some context
This is the embarrisingly simple code driving my Nixie clock
TODO: add some context
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>title</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
Hello world! |
// This is called a closure which makes sure that all variables stay local. | |
// Start script when everything is loaded properly. | |
window.onload = (function () { | |
var data = [['red', 0], | |
['green', 30], | |
['blue', 60]]; | |
var canvas = d3.select('#canvas').append('svg:svg'); | |
var update = function (data) { | |
// This selection is the same for appending, updating, and removing elements | |
// for this reason I am using a variable here. I think this pattern makes it |
.axis path, | |
.axis line { | |
fill: none; | |
stroke: black; | |
shape-rendering: crispEdges; | |
} | |
.axis text { | |
font-family: sans-serif; | |
font-size: 11px; |
Using census data.
.axis path, | |
.axis line { | |
fill: none; | |
stroke: black; | |
shape-rendering: crispEdges; | |
} | |
.axis text { | |
font-family: sans-serif; | |
font-size: 11px; |
import com.rbnb.sapi.SAPIException; | |
import edu.ucsd.rbnb.simple.*; | |
import jssc.SerialPort; | |
import jssc.SerialPortException; | |
public class main { | |
public static void main(String[] args) { | |
SerialPort serialPort = new SerialPort("/dev/rfcomm1"); | |
String buffer = ""; | |
SimpleSource src = new SimpleSource("Arduino Sensors"); |
*.bin | |
*_test* |
BEGIN; | |
-- CREATE SOME POINT LOCATIONS | |
DROP TABLE IF EXISTS geostuff.locations; | |
DROP SEQUENCE IF EXISTS geostuff.locations_id; | |
CREATE SEQUENCE geostuff.locations_id START 1; | |
CREATE TABLE geostuff.locations ( | |
id integer PRIMARY KEY DEFAULT nextval('geostuff.locations_id'), | |
name varchar(30), | |
geom geometry(POINT, 4326)); | |
ALTER TABLE geostuff.locations OWNER TO dbuser; |
Arduino bluetooth example
In order to load the Arduino sketch in the Arduino IDE it must be placed in a folder that has the same name as the *.ino file. Clone with:
git clone https://gist.github.com/604d667da192a86d8534.git bluetooth_example
Get the Arduino environment here http://arduino.cc/en/Main/Software
To handle bluetooth connections in Python see http://people.csail.mit.edu/albert/bluez-intro/. This library depends on