Skip to content

Instantly share code, notes, and snippets.

1. MyRobot constructor is called.
2. Relay is initialized on port 8.
3. Relay constructor is called
4. GetDefaultDigitalModule() is called as an argument to the InitRelay parameter
5. InitRelay is called with the default slot, slot channel (relay port) is placed in m_channel
6. Relay.m_module is declared as a new DigitalModule
7. Reverse is set to false
8. Reverse is set to true.
9. MyRobot constructor finishes
10. TeleopInit is called
*~
*.cproject
*.project
*.wrmakefile
*.wrproject
Makefile
*.o
*.d
#!/usr/bin/env ruby
class Influence
def get_data_lines
file_path = File.dirname(__FILE__) + '/input.txt'
input_data = File.read(file_path)
return input_data.split("\n")
end
<?php
/*
@author: Andrew Horsman
@description: Incremental permutations.
*/
class PermutationGenerator {
public $characters = array('!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~');
<?php
/*
@author: Andrew Horsman
@description: Notifies Folding@Home progress.
@prerequisites:
Ubuntu 9.04+ (Notification Systray)
libnotify-bin (install via sudo apt-get install libnotify-bin)
PHP 5+
Folding@Home (http://folding.stanford.edu)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en-us" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Twitter Badge</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
#!/usr/bin/env ruby
# PID Simulation
# Andrew Horsman
# 01/19/2011
# Notes:
# Arm range of motion should be a 90 degree arc, 33% of the potentiometer's range of
# motion.
require 'sinatra'
require 'net/http'
require 'json/pure'
require 'RMagick'
require 'open-uri'
require 'cgi'
include Magick
set :public, File.dirname(__FILE__) + '/public'
#!/usr/bin/env ruby
puts "I solemnly swear to write more Ruby."
@basicxman
basicxman / MMRambotics Feed Helper
Created March 17, 2011 16:48
Generates JSON for a webcast entry.
#!/usr/bin/env ruby
class String
def initial_format!
gsub!("\n", "")
gsub!("\r", "")
gsub!('"', "'")
end