Zeven Rodriguez

Spring 2010

Nursery Rhyme

Reading and Writing Text

Comments Closed


Share this post
The idea for the project was to mash-up nursery rhymes. I used speeches from obama and palin to re-populate the rhymne
Little Mr. barack, sat on a check
Eating his curds and growth
Along came a crisis
Who sat down beside his
And frightened Mr. barack month

Little Mr. barack, sat on a stock
Eating his curds and risk
Along came a crisis
Who sat down beside his
And frightened Mr. barack risk


Little Mr. barack, sat on a check
Eating his curds and applause.
Along came a This
Who sat down beside his
And frightened Mr. barack applause.


Little Mr. barack, sat on a pick
Eating his curds and issue
Along came a is
Who sat down beside his
And frightened Mr. barack rescue


Little Mr. barack, sat on a pick
Eating his curds and come
Along came a this
Who sat down beside his
And frightened Mr. barack outcome


Little Miss palin, sat on a win
Eating her curds and kill
Along came a never
Who sat down beside her
And frightened Miss  palin still


Little Miss palin, sat on a McCain
Eating her curds and Al
Along came a pollster
Who sat down beside her
And frightened Miss palin Al


Little Miss palin, sat on a remain
Eating her curds and food
Along came a teleprompter
Who sat down beside her
And frightened Miss palin good


Little Miss palin, sat on a again
Eating her curds and “TARP
Along came a another
Who sat down beside her
And frightened Miss palin “TARP


Little Miss sarah, sat on a Yeah
Eating her curds and question[s]
Along came a together
Who sat down beside her
And frightened Miss sarah question[s]


from BeautifulSoup import BeautifulSoup
import urllib
import sys
import random


words = set()
wordSet = set()
rhyme = dict()
rhymeList = list()

url = "littlemuffet.html"
changer = sys.argv[1]
name = sys.argv[2]

data = urllib.urlopen(url).read()
soup = BeautifulSoup(data)

genderID1 = "Mr."
genderID2 = "his"

#parses speech
for line in sys.stdin:
  line = line.strip()
  line_words = line.split(" ")
  for word in line_words:
    words.add(word)

for word in words:
    wordLength = len(word)
    if (".")  in word:
        wordSet.add(word[:(wordLength-1)])
    elif (",") in word:
        wordSet.add(word[:(wordLength-1)])
    elif (";") in word:
        wordSet.add(word[:(wordLength-1)])
    elif ("?") in word:
        wordSet.add(word[:(wordLength-1)])
    elif (":") in word:
        wordSet.add(word[:(wordLength-1)])
    else:
        wordSet.add(word)


for word in wordSet:
    wordLength = len(word)
    lastLetter = word[wordLength-2:wordLength]

    if lastLetter in rhyme.keys():
        rhyme[lastLetter].append(word)
    else:
        rhyme[lastLetter]=[word]







if "true" in changer:
    gender1 = soup.findAll('span', { "id" : "1" }, { "gender" : changer })
    gender2 = soup.findAll('span', { "id" : "4" }, { "gender" : changer })

    for i in range(0,len(gender1)):
                   gender1[i].replaceWith(genderID1)
    for i in range(0,len(gender2)):
                   gender2[i].contents[0].replaceWith(genderID2)
else:
  gender1 = soup.findAll('span', { "id" : "1" }, { "gender" : changer })
  for i in range(0,len(gender1)):
                  origWord = gender1[i].contents[0]
                  gender1[i].replaceWith(origWord)

namer = soup.findAll('span', { "id" : "2" }, { "namer" : "1" })
for i in range(0,len(namer)):
    namer[i].contents[0].replaceWith(name)

#rhyme 1
rhyme1 = soup.findAll('span',{ "rhyme" : "1" })
baseRhyme1 = str(rhyme1[0].contents[0])
baseRhyme1Last = baseRhyme1[len(baseRhyme1)-2:len(baseRhyme1)]
rhyme1Search = rhyme[baseRhyme1Last]
rhyme1Word = random.choice(rhyme1Search)
rhyme1[0].replaceWith(baseRhyme1)
rhyme1[1].replaceWith(rhyme1Word)
rhyme1[2].replaceWith(baseRhyme1)


#rhyme 1
rhyme2 = soup.findAll('span',{ "rhyme" : "2" })
letters = random.choice(rhyme.keys())
randomList = rhyme[letters]
rhyme2Word1 = random.choice(randomList)
rhyme2Word2 = random.choice(randomList)

rhyme2[0].replaceWith(rhyme2Word1)
rhyme2[1].replaceWith(rhyme2Word2)

#rhyme 3
rhyme3 = soup.findAll('span',{ "rhyme" : "3" })
baseRhyme3 = str(rhyme3[0].contents[0])
baseRhyme3Last = baseRhyme3[len(baseRhyme3)-2:len(baseRhyme3)]
rhyme3Search = rhyme[baseRhyme3Last]
rhyme3Word = random.choice(rhyme3Search)
rhyme3[0].replaceWith(baseRhyme3)
rhyme3[1].replaceWith(rhyme3Word)
rhyme3[2].replaceWith(baseRhyme3)


print soup
Little <span id="1" gender="true" >Miss</span> <span id="2" namer="1" rhyme="1">Muffet</span>, sat on a <span id="3" rhyme="1">tuffet</span>

Eating <span id="4" gender="true" rhyme="3">her</span> curds and <span id="5" rhyme="2">whey</span>

Along came a <span id="5" rhyme="3">spider</span>

Who sat down beside <span id="4" gender="true" rhyme="3">her</span>

And frightened <span id="1" gender="true">Miss</span> <span id="2" namer="1" rhyme="1">Muffet</span> <span id="6" rhyme="2">away</span>

Political Nursery Rhyme from Zeven Rodriguez on Vimeo.

Read more

LumiLife

Sustainable Energy

Comments Closed


Share this post

LumiLife is a solar powered lantern that during the day sleeps and charges and comes alive with breath and light at night. It uses a nocturnal circuit and a motor control circuit to light up and bellow the lamp. It was designed and created by Susan Ngo and Zeven Rodriguez.

LumiLife from Zeven Rodriguez on Vimeo.

This is the diagram of how it all flows together.

The nocturnal circuit is made of a 74AC14

This is the schematic for the nocturnal circuit from the beam wiki site.

The motor controller circuit is composed of a 74AC14 and a 74AC240. The motor circuit was made from this tutorial on the beam wiki site. The parts include

74AC14 Hex Schmitt Inverter IC (the MicroCore chip).

74AC240 Octal Buffer / Line Driver with Tri-state Outputs (The Motor Driver).

.22 uF Monolithic Capacitors (Four).

10 uF Monolithic, Electrolytic or Tantalum Capacitors (Two).

2 Meg Resistors red-black-green (Four).

4.2 uF Monolithic or Tantalum Capacitors (One for the Reversing Circuit).

3 Meg Resistors orange-black-green (One for the Reversing Circuit).

1N914 or 1N4148 Diodes (Two).

This picture from the beam wiki site illustrates all of the basic connections for the 74AC14 microcore to work.

This is how to wire the 74AC240

The one thing missing from the graphic above is a cap going from pin 20 to pin 1.

This image shows how to connect the motors and connect the 74AC14 and 74AC240.

•Solar Panels
– Open circuit: 4x 4.5v @ ~20 mA
•Battery
– 3x 1.2v @ 600mAh
•Motors & LEDs = 3.6 @ 300mAh
– 2x Motors
– 6x LEDs

Read more

Collager

Hospitable Room

Comments Closed


Share this post

Collager is a screen based interactive table that lets you compose collages from images you take from your surroundings and then stamp on the screen.  It is designed by Zeven Rodriguez and Matt Swenson for the kids at the NYU Langone Medical Center: The Rusk Institute of Rehabilitation Medicine Pediatric Department.

The system works in 2 parts: the controller and the the over head camera. The controller has a camera inside and a IR light. The controllers camera is used to take pictures of your surroundings. The IR light inside the ball is used to position and stamp the image on to the screen.

The UI of the interface is displayed above. The interface is trying to maintain a easy and kid friendly approach. The use of primary colors is not only design choice, but is a palette for the drawing tool.
The Basic setup for the system is a computer, a 24in monitor, a camera, and a custom puck object we created.

Read more

Reddit 5-7-5 poems

Reading and Writing Text

Comments Closed


Share this post

This python program grabs headlines from reddit’s homepage and picks a headline randomly and converts it into a randomized 5-7-5 structured poem

Here YEARS Here 2 undercover
for goes YEARS report. Here is author
YEARS evangelical Atheist is church.

consider understands and seeking understands
service host; want understands want no you
assuming fucking one you’re Lunarpages.

Was Laid Off Obama? Off
Obama? for Obama? Off Employee Was Voting
Voting for Was Off Voting

Cool infographic infographic Nintendo Nintendo
infographic infographic infographic Nintendo Nintendo Cool infographic
infographic Cool Cool Nintendo Cool

from BeautifulSoup import BeautifulSoup
import urllib
import random

def haiku(words):

  for i in range(0,5):
    haiku = random.choice(words)
    haikuList1.append(haiku)

  print " ".join(haikuList1)

  for i in range(0,7):
    haiku = random.choice(words)
    haikuList2.append(haiku)

  print " ".join(haikuList2)

  for i in range(0,5):
    haiku = random.choice(words)
    haikuList3.append(haiku)

  print " ".join(haikuList3)


url = "http://www.reddit.com/r/reddit.com/"
titlesList = list()
num = int()
haikuList1 = list()
haikuList2 = list()
haikuList3 = list()

data = urllib.urlopen(url).read()
soup = BeautifulSoup(data)

for tag in soup.findAll("p", {"class" : "title"} ):
  a = tag.findAll("a", {"class" : "title "} )
  titles = a[0].string.encode('ascii', 'ignore')
  titles = titles.strip()
  titles = titles.split(" ")
  titlesList.append(titles)

num = random.randrange(0,len(titlesList))
words = titlesList[num]
haiku(words)

Read more

Power Consumption Calculation for xbee 900

Wildlife Tracking

Comments Closed


Share this post

First we calculate our battery
The battery is rated at 3.7v @ 200 mA to make it easier to convert later we turn it into micro volts.

To calculate the Watt hours = voltage * Amps
740,000 micro watt hours = 3.7volts * 200,000 micro amp hours

Now we Calculate the xbee 900 which run at 3.3v:
The xbee has 3 modes we have to deal with their consumption:
sleep mode: 60 micro amp hours
transmit mode: 210,000 micro amp hours
receive mode: 80,000 micro amp hours

next is calculating the time ratio
We are sending and receiving 100 times a day
each takes 1 second
thats 200 seconds everyday 73,000 seconds
31,556,926 seconds in one year
73,000 secs/31,556,926 secs = .002 the xbee is transmitting and receiving during the year

We have combined the 2 events so we can average:
80,000 micro amps and 210,00 micro amps = 135,000 micro amps

Now that we have a time ratio we calculate
(.002)(3.3volts)(135,000 micro volts) + (.998)(3.3volts)(60 micro volts) = 740, 000 micro amp hours
The right side of our calculation gives use Watts and the left gives us Watt hours

891 watts + 197 watts = 740,000 micro amp hours
1088 watts = 740,000 micro amp hours
740,000/1088 = 680 hours or 35 days on one battery
we need this to last at least a year and a half
That will be 27 batteries but we’ll need closer to 36 batteries to be safe

The most important number is that for a year and a half we need more then 3600 milliamps at 3.3v

Read more

Charlotte’s Web

Sustainable Energy

Comments Closed


Share this post

Zeven and I are creating a solar powered tone generator for our final with a form factor of a spider. A miller engine circuit will power the “legs” which will act as switches to set off the tones.

We are using the simple LM 386 amplifier circuit and a hacked into Hex Schmitt Trigger. Both circuits are powered by four solar panels wired in Series and Parallel. The buzzing oscillator sound is a square wave and runs on 6 volts.

The Miller Engine Circuit is powered by 4 solar panels wired in parallel creating 80 -100 miliamps and 3 volts. A small geared page motor acts as a “leg” switch to turn on the audio circuit.

Right now we are having an issue with the miller engine. Our amperage for our circuit is being lost somewhere in our circuit. We are only getting 25mA out of a possible 130mA. After testing the capacitors, trigger, and transistor we have found out that those are not the problems. We now assume it could be the signal pin on the voltage trigger not letting all of the amperage through.

Read more

RF Radios

Wildlife Tracking

Comments Closed


Share this post

My group and I were testing these RF Radios to see if we can make some DIY rfids. These modules are 434 mhz radio transmitter and receiver pairs that run at a range from 2v – 12v. It operates at 2400 baud rate. For more information is located on the sparkfun site: transmitter and receiver.

One of the most important things is the shape of the antenna. Coiling around a 1/2 inch cylinder give a good signal. The receiver is well labeled the only trick is that middle power pin needs to be grounded with a capacitor. This helps smooth out the radio signal coming through. The receiver data pin goes connected to the RX port. For simple tests simply listening to the serial port will give you the transmitted data.

The receiver’s data pin goes connected to whatever you want to send across the link. In this case we are sending analog values via a pot. The data pin is connected to the RX pin.

Read more

RWET Midterm: SOS Poem

Reading and Writing Text

Comments Closed


Share this post

The SOS Poem structure is based on the Morse code sequence . . . _ _ _  . . . Another goal for the poem is to follow the rhythm of SOS by using the following word structure: Name and Name Adverb Verb Adverb Name and Name. Also each name is composed of three letter names and the adverbs and verbs are composed of nine letter words. You can also see that it has a palindrome feel to it. Because of how the code is set up it words best when you input a list of names and another source text.

The source text is a list of congress people and the Obama Health Care bill

Lee and Jos gradually clarifying gradually Lee and Jos
Ken and Ron currently conducting currently Ken and Ron
Dan and Max seriously increased seriously Dan and Max
Ike and Joe primarily empowering primarily Ike and Joe

For and Fee gradually clarifying gradually For and Fee
All and One currently conducting currently All and One
But and Tax seriously increased seriously But and Tax
Act and Key primarily empowering primarily Act and Key

import sys
import re
congress = set()
congressName = list()
bill = set()
billWords = list()
verbs = set()
verbsList = list()
adverbs = set()
adverbsList = list()
state = "New"
name = " "
words = " "
verb = " "
adverb = " "
congressCounter = 0
verbCounter = 0
adverbCounter = 0
displayCounter = 0
fileObj = open('obamacare.txt')

lines = fileObj.readlines()

for line in sys.stdin:
    line.strip()
    for matching_string in re.findall(r's[A-Z][a-z][a-z]b', line):
        name = matching_string
        congress.add(name)

congress.remove(" New")

congressCounter = len(congress)
for num in range(0,congressCounter):
    name = congress.pop()
    name=name[1:]
    congressName.append(name)

for words in lines:
    words.strip()
    for matching_verb in re.findall(r"bw{7}ed|bw{7}ing",words):
        verb = matching_verb
        verb = verb.lower()
        verbs.add(verb)

verbCounter = len(verbs)
for num in range(0,verbCounter):
    verb = verbs.pop()
    verbsList.append(verb)

for words in lines:
    words.strip()
    for matching_adverb in re.findall(r"bw{7}ly",words):
        adverb = matching_adverb
        adverb = adverb.lower()
        adverbs.add(adverb)

adverbCounter = len(adverbs)
for num in range(0,adverbCounter):
    adverb = adverbs.pop()
    adverbsList.append(adverb)

if congressCounter < verbCounter and congressCounter < adverbCounter:
    displayCounter = congressCounter
elif verbCounter < congressCounter and verbCounter < adverbCounter:
    displayCounter = verbCounter
elif adverbCounter < verbCounter and adverbCounter < congressCounter:
    displayCounter = adverbCounter

for num in range(0,displayCounter,2):
    #print num
    if num < displayCounter:
        nameone = congressName[num]
        nametwo = congressName[num +1]
        print(nameone + " and " + nametwo + " " + adverbsList[num] + " " + verbsList[num] + " " + adverbsList[num] + " " + nameone + " and " + nametwo)

Congress Text
Obama Care Text

Read more

Pan Ball Flute Update

Sustainable Energy

Comments Closed


Share this post

For the first iteration of the pan ball flute, I decided to create a mock up of how this would work. The pan ball flute is set up like a piston in a car. This first iteration is using one magnet piston with a piezo buzzer, a led and a rectifier. The magnet induction piston uses 2 opposing 15 pound pull force magnets and a small magnet opposing the center magnet.


These are just some basic numbers on the solo shaker
The Open Circuit Voltage = 10v
The Test Capcitor = 1 Farad
Start and End Voltage = 100mV-3V
Change in Joules = 4.5J
E = 1/2 C * V 2

Time to Charge = 20 sec
Observed Power (watts) = .225 watts
Energy / Time

Read more

ASCII Art Presentation

Reading and Writing Text

Comments Closed


Share this post

ASCII Art Presentation

Read more