March 09, 2006
shadowBox - 3.9.06 update
We finally got full control of servo motors, using the patterns that Min made and lasercut at the NYU ITS lab we got some cool 3d effects, especially using the fabrics on top of the box.
I rewired the arduino board and placed it on a regular breadboard. Finally workable and easily managed:
From here, our next big challenge is to fully control the lights, either using shift registers or transistor arrays, or whichever other way we find.
Here's the current arduino code to control 6 different servo motors using 6 potentiometers:
more inspiring shadow-play photos from Myanmar:





Posted by Gilad Lotan at 09:49 PM | Comments (0)
March 08, 2006
Ubi.ach - updated flowchart
We are getting a mini-itx board, that will do the following actions, in order:
1. activate a popper perl script every minute to check the email account (ubiach@gmail.com). This perl script will send the email to a php file located on the mini-itx.
2. The php file will:
a. parse the new email messages and place them in a database (SQL).
b. place the subject of the message on the clipboard
can use the - GtkEditable::copy_clipboard command:
void copy_clipboard(void);
copy_clipboard() copies the current selection to the clipboard.
It also causes the "copy-clipboard" signal to be emitted.
c. The TTS application will run automatically (from the startup), and take as argument anything that's on the clipboard. Then needs to erase the clipboard.
Posted by Gilad Lotan at 04:43 PM | Comments (0)
March 06, 2006
SPEAKER - Scott Draves
Speaker: Scott "Spot" Draves
Title: Dreams in High Fidelity
URL: http://hifidreams.com
Graphic: http://hifidreams.com/thistle.jpg

Fractals / graphics
The electric sheep - graphic display between thousands of people (like seti at home)
Apothesis - multi user graphics display
Dreams of High Fidelity - open source network + refined version (to bring in the money)
1992 - Iterated Function System - Hutchinson (81), Barnsley (88) - Michael Barnsley ("fractals everywhere" - book) - linear functions / B&W
Non-linear function parameters -> more interesting
1999 - Distributed screen saver - created by everyone in the network. Everyone sees the same on the screen.
2003 - generic algorithm - people vote (using up and down buttons) when the screensaver is running -> then the "good" ones stay longer.
Posted by Gilad Lotan at 07:29 PM | Comments (0)
March 05, 2006
Controling a Servo Motor
Been a long long day, but hey, this thing finally works. managed to get a potentiometer to control a servo motor using the arduino board. Found out that the language still doesn't implement floats(too bad), but is fairly simple and easy to use (although I was pretty much cursing along the way!).
IMPORTANT THINGS I FORGOT ALONG THE WAY:
- motors need separate power supplies (can't use USB power!).
- don't program the chip while still running the serial!
First code I used: - (mainly Tom Igoe's)
/* Gilad Lotan (modification of Tom Igoe's code)
Control a Servo motor
*/
int servoPin = 2; // Control pin for servo motor
int minPulse = 500; // Minimum servo position
int maxPulse = 2500; // Maximum servo position
int pulse = 0; // Amount to pulse the servo
int analogValue = 0;
int analogPin = 3;
int myVar = 0;
// functions
void newline(void);
void setup() {
pinMode(servoPin, OUTPUT); // Set servo pin as an output pin
pulse = minPulse; // Set the motor position value to the minimum
beginSerial(9600);
}
void loop() {
analogValue = analogRead(analogPin); // read the analog input
myVar = minPulse + (analogValue * 2);
// when arduino gets floats, we can use the following command to get the precise value
//myVar = (analogValue/1023)*(maxPulse - minPulse) + minPulse; // convert the analog value
printInteger(myVar); // print it out for reference
newline();
digitalWrite(servoPin, HIGH); // Turn the motor on
delayMicroseconds(myVar); // Length of the pulse sets the motor position
digitalWrite(servoPin, LOW); // Turn the motor off
delay(20); // 20 millisecond delay is needed between pulses
// to keep the servo in sync
}
void newline() {
printNewline();
printByte(13);
}
Adapted code: (to deal with specifying turning angles)
/* Gilad Lotan (modification of Tom Igoe's code)
Servo motor control (with angles)
---------------------------------
This code enables a servo motor to turn to a specific wanted angle (using servo
motors that have a maximum turn angle of 180 degrees).
*/
/************************************************************************************
variables
*************************************************************************************/
int servoPin = 2; // Control pin for servo motor
int minPulse = 500; // Minimum servo position
int maxPulse = 2500; // Maximum servo position
int pulse = 0; // Amount to pulse the servo
int analogValue = 0;
int analogPin = 3;
int myVar = 0;
/************************************************************************************
function declarations
*************************************************************************************/
void newline(void);
void pulsout( int servoPin, int pulse);
void turnServo(int angle);
/************************************************************************************
setup
*************************************************************************************/
void setup() {
pinMode(servoPin, OUTPUT); // Set servo pin as an output pin
pulse = minPulse; // Set the motor position value to the minimum
beginSerial(9600);
}
/************************************************************************************
main loop
*************************************************************************************/
void loop() {
/*
// read analog input from 'analogPin'
analogValue = analogRead(analogPin);
// calculate the input relative to the input range and angle range
myVar = (analogValue * 180)/1023;
// change the analog reading to the wanted range (between 500 to 2500)
//myVar = minPulse + (analogValue * 2);
turnServo( myVar );
// turn servo to the 50 degrees mark
*/
turnServo(50);
delay(500);
turnServo(5);
delay(500);
turnServo(150);
delay(500);
turnServo(5);
delay(500);
turnServo(20);
delay(500);
turnServo(90);
delay(500);
}
// brings servo motor to the wanted angle (between 0 to 180 degrees)
void turnServo(int angle) {
int i;
// this loop is done in order to turn the servo motor to the wanted angle
for( i=1;i
// calculates the amount to pulse to the servo (this servo can turn maximum 180 degrees)
pulse = (i*2500)/180;
// add the minimum amount for the pulse, and the relative position of the given angle
// compared to the maximum angle
pulse += 500+((2000/180)*i);
// pulse the servo motor
pulsout( servoPin, pulse);
}
}
// makes the servo motor, placed in 'servoPin' pulse for 'pulse' length in microseconds
void pulsout( int servoPin, int pulse) {
digitalWrite(servoPin, HIGH); // Turn the motor on
delayMicroseconds(pulse); // Length of the pulse sets the motor position
digitalWrite(servoPin, LOW); // Turn the motor off
delay(20); // 20 millisecond delay is needed between pulses
}
// newline function -> prints out new line (\n) as well as a carriage return (\c);
void newline() {
printNewline();
printByte(13);
}
Posted by Gilad Lotan at 01:33 AM | Comments (0)
March 04, 2006
Ubicomp midterm
Here's what I managed to do for my midterm. It works well for t-mobile. Not sure about other phones yet. And there's still a problem with foreign alphabet...
Posted by Gilad Lotan at 11:27 AM | Comments (0)
March 03, 2006
Notes from today's meeting with Clay
list of main ideas from our presentation:
- weblogs have done this for text. Video is different.
- social filtering tools.
- display material on a timeline (ability to go back)
- translation & alternate views
- bridging push&pull (RSS feeds & social filtering-> gives a more complex way to receive data)
- scaling between freinds -> haveing a mix of friends (personal) data with traditional news
- economic models
He said that these topics were the main things he picked up from our presentation, and that we definitely have to narrow it down. I think it is obvious which 2 we all like. Probably not going to be difficult to choose.
SOCIAL FILTERING:
filtering of the data that reaches you, through your peer network (1st neighborhood - most affect,2nd - less... etc). By the 6th neighborhood of peers, we should be basically reaching the whole WWW. "The Daily Me" - this model of social filtering exists nowadays, but too self-centered -> doesn't take into account outside news, this way the user can miss out on important events. Also, this model allows for little serendipity (which we all love), as well as it being hard to know what will be interesting for me (how do i know, when I don't know what's out there?!)
Clay said that we should basically take social filtering for granted - we should think that in a couple of years the technology is there, and that we can apply it to our application.
PROBLEMS WITH VIDEO:
ALTERNATE POINTS OF VIEWS / GLOBAL INTERESTS:
translation & thresholds. Networking local sites. Clay talked about how there is a loss of control -> beforehand, there used to be only 3 news networks, which everyone looked at to see the news. That was the absolute truth. Nowadays, there are so many sources, each one telling the story a bit differently. "Fake neutrality is gone!". How can we trust the news? There is a movement from authority to proxy-> peer review is a better model (wikipedia vs. Britanica).
- But how can we bridge these cultural gaps and get people to know things that they don't know?
- how do we say to someone "you should see this, for different values of 'should' ??"
his suggestions:
- translate 3 weblog posts for the ITP community / pick a few topics to translate for the ITP list -> find something thats not translated regularly and that people would be interested in reading
- write to the ITP list and ask who wants to subscribe
- need to find sources of video (maybe from ITP students)
- who are the users? Interview them about their interests from foreign countries. What would they like to see? Have no more than 10 questions.
- something good & linguistically remote -> is always a problem to find and bring to people! will be a challenge.
- he suggested that we "take advantage of the potential for the international social capital" that exists through the internet, and that is still fairly untouched.
WE NEED TO SEND CLAY A PARAGRAPH - "we are working on x" - explaining which part we're going to concentrate on in the next couple of weeks.
Posted by Gilad Lotan at 11:33 PM | Comments (0)
Ubi.ach - resources research
So we need a mini-itx board, (memory & RAM)
as well as Text-to-speech software... here's what we got from the loving ITP community.
MINI-ITX:
--------
http://www.mini-itx.com/
http://www.windowsfordevices.com/articles/AT3695724814.html
added-on features:
TTS software:
------------
Mike Olson (used to work for Dragon):
- Microsoft Speech SDK
- Nuance - too expensive for poor students like us
Dimitri Darras (ddarras@yahoo.com):
- Mbrola
- Cepstral (has a fee)
Christian Croft:
- Download FreeTTS 1.2.1
his installation notes:
FreeTTS Setup Tutorial Limits to Free TTS "FreeTTS provides some level support for the Java Speech API v1.0 (JSAPI). In particular, since FreeTTS is a speech synthesis system, none of the JSAPI 1.0 Recognition interfaces are supported. In addition, FreeTTS supports only a subset of the JSAPI 1.0 javax.speech.synthesis specification. The FreeTTS support for JSAPI 1.0 has the following restrictions: JSML Speech Markup is ignored. FreeTTS will process JSML, but currently does not apply the markup to the generated speech. FreeTTS does not currently generate the WORD_STARTED or the MARKER_REACHED events. Vocabulary management is not supported. The Synthesizer.phoneme() method is not implemented. PropertyVeto exceptions are not always properly thrown when property change requests are rejected or constrained." Download FreeTTS 1.2.1 at http://freetts.sourceforge.net/docs/index.php#download_and_install >>> Just get the bin package unless you want to modify the source files, then you want the source as well This is a third party package, so you have to go through a process of agreeing to an installer agreement. Put the freetts folder that you downloaded into (I put the whole thing, if you're an expert and know exactly which files you need ) System/Library/Java/Extensions Good setup instructions for Java Speech API 1.0 here (apparently there's a 2.0, but I haven't found it...) In the terminal, change directory to the lib directory of the freetts folder, and execute the following commands: Type chmod +x jsapi.sh Type sh jsapi.sh The BCL (Binary Code Liscense appears for you to "read it.") appears on the screen If the BCL is acceptable, accept it by typing "y". The jsapi.jar file will be unpacked and deposited into the lib directory. Then be sure to put the speech.properties file in your users/home directory In the freetts folder that you downloaded, open FreeTTSHelloWorld.java (find it in freetts/demo/freetts/HelloWorld/FreeTTSHelloWorld.java ) in Eclipse. Under Build Path, add all the .jar files from freetts/lib and you should be able to run it as a Java Application and hear kevin16 say "Thank you for giving me a voice. I'm so glad to say hello to this world."
Posted by Gilad Lotan at 10:41 PM | Comments (0)