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
require 'date' | |
require 'CSV' | |
require 'influxdb' | |
influxdb = InfluxDB::Client.new "twitter" | |
influxdb.delete_database("twitter") | |
influxdb.create_database("twitter") | |
CSV.foreach("data/tweets.csv", {headers: true}) do |row| | |
data = { |
- http://www.gamasutra.com/blogs/AlistairDoulin/20111124/90671/Test_Driven_Game_Development_Experiences.php
- http://gamedev.stackexchange.com/questions/7727/is-test-driven-development-viable-in-game-development
- http://www.slideshare.net/istoriae/test-driven-development-for-games-what-why-and-how-game-connect-2006
- https://github.com/orfjackal/tdd-tetris-tutorial
- https://www.youtube.com/watch?v=9NTY28oR5bw
- http://www.gamasutra.com/features/postmortem/
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
const int player1Button = A0; | |
const int player2Button = A1; | |
const int player1Led = 5; | |
const int player2Led = 9; | |
int player1ButtonState = 0; | |
int player2ButtonState = 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
const int sliderInput = A0; | |
const int oscillator = 5; | |
void setup() { | |
pinMode(oscillator, OUTPUT); | |
Serial.begin(9600); | |
} | |
int scale[] = {12, 20, 32, 40, 48, 60, 68, 80, 88, 96, 108}; |
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
const int noteSelector = A0; | |
const int oscillator = 5; | |
const int scaleSelector = A1; | |
const int barGraph = 9; | |
int scaleA[] = {0, 2, 4, 5, 7, 9, 11, 12, 12 + 2, 12 + 4, 12 + 5, 12 + 7, 12 + 9, 12 + 11, 12 + 12}; | |
int scaleB[] = {0, 2, 3, 5, 7, 8, 10, 12, 12 + 2, 12 + 3, 12 + 5, 12 + 7, 12 + 8, 12 + 10, 12 + 12}; | |
int scaleC[] = {0, 2, 5, 7, 9, 12, 12 + 2, 12 + 5, 12 + 7, 12 + 9, 12 + 12}; | |
int scaleD[] = {0, 3, 5, 6, 7, 10, 12, 12 + 3, 12 + 5, 12 + 6, 12 + 7, 12 + 10, 12 + 12}; |
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
# USAGE: | |
# require './cloudbit_client' | |
# client = CloudBitClient.new('your_api_token', 'your_device_id') | |
# client.output(100) | |
# client.output(50, 3000) | |
require 'rest_client' | |
class CloudBitClient | |
def initialize(api_token, device_id) |
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
require 'arduino_firmata' | |
require 'l8' | |
l8 = L8::Smartlight.new "/dev/ttyACM0" | |
puts "Connected to L8" | |
l8.clear_matrix | |
l8.set_brightness(:low) | |
arduino = ArduinoFirmata.connect "/dev/ttyACM1" | |
puts "Connected to Arduino" |
OlderNewer