Skip to content

Instantly share code, notes, and snippets.

View nro-bot's full-sized avatar

nro-bot

View GitHub Profile
@nro-bot
nro-bot / api_test.py
Created June 19, 2011 03:24
API Wrapper Jun 18 2011
class all_api(object):
def __init__(self):
self.dictionary = {"category":"by_category/%s", "state":"all_by_state/%s", "business_state":"state_only/%s/%s"}
def by_keyword(self, *keyword):
if (len(keyword) == 2):
url = self.dictionary[keyword[0]] % (keyword[1])
elif (len(keyword) == 3):
url = str(self.dictionary[keyword[0]] % (keyword[1], keyword[2]))
elif (len(keyword) == 3):
@nro-bot
nro-bot / emailnotif.js
Created November 3, 2011 03:35
makerships package package notification google apps script
//When run, (a) creates a custom menu -- script is not run automatically, you have to hit the button
//(b) checks the spreadsheet to see who if package has arrived and email notification has not yet been sent.
//This is not smart enough to combine multiple packages into one email, so fairly spamtastic.
//loads our special menu each time the spreadsheet is opened
function onOpen() {
loadMenu();
}
function sendEmails() {
@nro-bot
nro-bot / serialxycoord_arduino.pde
Last active December 9, 2018 23:45
transmitting x,y coordinates back and forth between arduino and processing
int buf = 0;
int xcoordinate = 0;
int ycoordinate = 0;
void setup()
{
// start serial port at 9600 bps and wait for port to open:
Serial.begin(115200);
}
#include <Servo.h>
Servo servo1;
Servo servo2;
float theta1;
float theta2;
int pot1 = 0;
int pot2 = 1;
void setup() {
@nro-bot
nro-bot / control.pde
Created July 21, 2014 14:00
NarwhalEdu Swarmbuddies - Processing GUI
import processing.net.*;
Client myClient;
int boxSize = 50;
int buttonSizeX = 20;
int buttonSizeY= 10;
boolean overBoxUp = false;
boolean overBoxDown = false;
boolean overBoxLeft = false;
void rxCallback(uint8_t *buffer, uint8_t len)
{
// other code as per Adafruit
if ((byte)buffer[0] == (byte)10){ //color cmd received
setColor(buffer[1],buffer[2], buffer[3]);
}
else if ((byte)buffer[0] == (byte)20){ //string cmd received
Lservo.write(buffer[1]);
Rservo.write(map(buffer[2],0,180,180,0));
}
@nro-bot
nro-bot / carousel-override.css
Last active August 29, 2015 14:13
Bootstrap Carousel example
@nro-bot
nro-bot / arm.py
Last active February 22, 2019 18:41
Robot arm (2 servo) 2015, python, arduino, processing
from math import *
import numpy as np
import matplotlib.pyplot as plt
import parse
l1 = 107
l2 = 110
elbowup = False
def get_angles(Px, Py):
@nro-bot
nro-bot / hexapod.ino
Created January 14, 2016 08:16
12 servo hexapod, arduino
#include <Servo.h>
int left1 = 3;
int left2 = 4;
int left3 = 7;
int left4 = 8;
int right1 = 5;
int right2 = 6;
int right3 = 9;
int right4 = 10;
@nro-bot
nro-bot / gist:1ae88e060f879e3fac1bbdbebd8b1e4f
Created August 15, 2016 19:45
EXCITING fashion + CAD things :D || Thur 25 Aug 2016, 6pm @ Boston Back Bay || Fwd: [fashion-1] Learn to Blend High Fashion Design with Technologies

Hello CSAIL-related,

There is an upcoming talk on the topic of the history of fashion and the techniques used in the 80s and 90s as a "manual drafting" process to design and tailor clothes to the individual.

This lady, now in her 80s, Shirley Willett, is amazing and got NSF grants in the 80s and 90s [1] to computerize the process of creating clothing -- sadly she was ahead of her time in her industry