

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cwwang.com &#187; Live Web</title>
	<atom:link href="http://cwwang.com/category/itp/live-web/feed/" rel="self" type="application/rss+xml" />
	<link>http://cwwang.com</link>
	<description>Che-Wei Wang</description>
	<lastBuildDate>Sat, 06 Nov 2010 15:58:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>21st Century Confession Booth</title>
		<link>http://cwwang.com/2008/12/11/21st-century-confession-booth/</link>
		<comments>http://cwwang.com/2008/12/11/21st-century-confession-booth/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 16:35:43 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=955</guid>
		<description><![CDATA[The 21st Century Confession Booth is a service for anyone to anonymously unload the burden of a sin or secret. Confessions can be dropped off by entering them on the web at confessionbot.com , by calling 718-406-0483, or by finding one of our public confession microphones. Messages are anonymously transcribed and posted to twitter.com/confessionbot. Behind [...]]]></description>
			<content:encoded><![CDATA[<p>The 21st Century Confession Booth is a service for anyone to anonymously unload the burden of a sin or secret.  Confessions can be dropped off by entering them on the web at <a href="http://confessionbot.com/">confessionbot.com</a> , by calling <strong><span style="font-size:18px">718-406-0483</span></strong>, or by finding one of our public confession microphones.  Messages are anonymously transcribed and posted to <a href="http://twitter.com/confessionbot">twitter.com/confessionbot</a>.</p>
<p>Behind the scenes, the phone system is using <a href="http://quicktate.com/quicktate/api.html">quicktate.com&#8217;s api</a> to transcribe speech to text and a custom php script to deliver the confession to twitter.</p>
<p><a href="http://cwwang.com/wordpress/wp-content/uploads/confession.png" rel="lightbox[955]" title="confession" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/confession.thumbnail.png" alt="confession" width="128" height="82" class="attachment wp-att-957 " /></a></p>
<p>Who do you have a crush on?<br />
Did you lie today?<br />
Who do you secretly hate?<br />
Who do you secretly love?<br />
Who do you envy?<br />
Have you cheated?<br />
How much was your last tip?<br />
What&#8217;s the dirtiest thing you&#8217;ve ever done?<br />
Do you secretly like KFC?<br />
How about that hair in your bf&#8217;s back?<br />
Do you pick your nose with your gf&#8217;s tweezers?<br />
What sites you visit when you are home alone?<br />
Did you really miss the train? really?<br />
Do you like tomato based sauces?<br />
Do you cheat on crosswords?<br />
Did you eat junk food everyday?<br />
Did you finish your room mates&#8217;s milk again?<br />
Are you really taking the pill?<br />
Do you like her apartment?<br />
Did you change your underwear today?<br />
What teacher would you have an affair with?</p>
<p>Leave a confession and get on with your day.</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/12/11/21st-century-confession-booth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I can&#8217;t stop thinking of you (too)</title>
		<link>http://cwwang.com/2008/12/07/i-cant-stop-thinking-of-you-too/</link>
		<comments>http://cwwang.com/2008/12/07/i-cant-stop-thinking-of-you-too/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 23:29:15 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=934</guid>
		<description><![CDATA[icantstopthinkingofyou.com redirecting to icantstopthinkingofyoutoo.com redirecting to icantstopthinkingofyou.com redirecting to icantstopthinkingofyoutoo.com with Celina Alvarado]]></description>
			<content:encoded><![CDATA[<p><a href="http://cwwang.com/wordpress/wp-content/uploads/icantstop.png" rel="lightbox[934]" title="icantstop" rel="lightbox"><img src="http://cwwang.com/wordpress/wp-content/uploads/icantstop.thumbnail.png" alt="icantstop" width="128" height="79" class="attachment wp-att-935 " /></a></p>
<p><a href="http://icantstopthinkingofyou.com/">icantstopthinkingofyou.com</a> redirecting to <a href="http://icantstopthinkingofyoutoo.com/">icantstopthinkingofyoutoo.com</a> redirecting to<br />
<a href="http://icantstopthinkingofyou.com/">icantstopthinkingofyou.com</a> redirecting to <a href="http://icantstopthinkingofyoutoo.com/">icantstopthinkingofyoutoo.com</a></p>
<p>with <a href="http://www.celinaalvarado.com/">Celina Alvarado</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/12/07/i-cant-stop-thinking-of-you-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elevator P</title>
		<link>http://cwwang.com/2008/11/20/elevator-p/</link>
		<comments>http://cwwang.com/2008/11/20/elevator-p/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 20:27:00 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=920</guid>
		<description><![CDATA[Elevator P interprets random conversation in an elevator into poetry and publishes them immediately on twitter. Using a hidden microphone, Elevator P captures unexpected chatter, un-staged and raw. The interpreter elevates mundane elevator conversations into beautiful flowing poetry capturing the deep essence of each dialogue. Haiku Poetry. http://twitter.com/chatterbot]]></description>
			<content:encoded><![CDATA[<p>Elevator P  interprets random conversation in an elevator into poetry and publishes them immediately on twitter.  Using a hidden microphone, Elevator P captures unexpected chatter, un-staged and raw.  The interpreter elevates mundane elevator conversations into beautiful flowing poetry capturing the deep essence of each dialogue.</p>
<p>Haiku Poetry.<br />
<a href="http://twitter.com/chatterbot">http://twitter.com/chatterbot</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/11/20/elevator-p/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The New Vote</title>
		<link>http://cwwang.com/2008/10/23/the-new-vote/</link>
		<comments>http://cwwang.com/2008/10/23/the-new-vote/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 14:36:35 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=903</guid>
		<description><![CDATA[TheNewVote.com is a location-based SMS polling system and place to post photographic proof of election day votes. The election process should be simpler and more transparent. This website allows people to declare their voting intent as well as to prove their actual vote on election day. Every voter&#8217;s opinion should matter when it comes to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://newvote.com"><img src="http://cwwang.com/wordpress/wp-content/uploads/newVote-371x300.png" alt="newVote" title="newVote" width="371" height="300" class="alignnone size-medium wp-image-1289" /></a></p>
<p><a href="http://thenewvote.com/">TheNewVote.com</a> is a location-based SMS polling system and place to post photographic proof of election day votes.<br />
<span id="more-903"></span><br />
The election process should be simpler and more transparent. This website allows people to declare their voting intent as well as to prove their actual vote on election day. Every voter&#8217;s opinion should matter when it comes to the presidential election, and this site gives individuals the power to create a higher resolution representation of the electoral outcome.</p>
<p>Vote tabulation should be efficient and error-free. The election result should not be subject to any chance of fraud or manipulation. Asking individuals to create photographic proof of their vote helps to keep the established voting system honest by adding a new user-generated layer of checks and balances. </p>
<p>The New Vote was built by Che-Wei Wang, Vikram Tank, and Alex Abreu.</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/10/23/the-new-vote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text Sandbox</title>
		<link>http://cwwang.com/2008/10/16/text-sandbox/</link>
		<comments>http://cwwang.com/2008/10/16/text-sandbox/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 02:38:07 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=896</guid>
		<description><![CDATA[Text Sandbox is a set of inline editable text boxes for your editing pleasure. Enjoy.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cwwang.com/liveweb/textsandbox/">Text Sandbox</a> is a set of inline editable text boxes for your editing pleasure.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/10/16/text-sandbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pixel Sandbox</title>
		<link>http://cwwang.com/2008/10/09/pixel/</link>
		<comments>http://cwwang.com/2008/10/09/pixel/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:21:54 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[2D Graphics]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work in Progress]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=890</guid>
		<description><![CDATA[Pixel Sandbox is a live pixel whiteboard. Click on a pixel to change its color and draw something. Together.]]></description>
			<content:encoded><![CDATA[<p><a href="http://cwwang.com/pixel"><img src="http://cwwang.com/wordpress/wp-content/uploads/pixelSandbox-1024x512.png" alt="pixelSandbox" title="pixelSandbox" width="570" height="285" class="alignnone size-large wp-image-1286" /></a></p>
<p><a href="http://cwwang.com/pixel">Pixel Sandbox</a> is a live pixel whiteboard.  Click on a pixel to change its color and draw something.  Together.</p>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/10/09/pixel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tilt Sensor to Live Web</title>
		<link>http://cwwang.com/2008/10/02/tilt-sensor-to-live-web/</link>
		<comments>http://cwwang.com/2008/10/02/tilt-sensor-to-live-web/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 06:05:17 +0000</pubDate>
		<dc:creator>che-wei wang</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Live Web]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work in Progress]]></category>

		<guid isPermaLink="false">http://cwwang.com/?p=871</guid>
		<description><![CDATA[Tilting my laptop changes the background color of a div element on a webpage. [Live Tilt] An applet reads tilt sensor values from my laptop, posts them to sensorbase.org, then a webpage running ajax reads the sensor values and changes a background color. LIVE. It&#8217;s super slow right now because I can&#8217;t figure out how [...]]]></description>
			<content:encoded><![CDATA[<p>Tilting my laptop changes the background color of a div element on a webpage. [<a href="http://cwwang.com/liveweb/liveTilt/">Live Tilt</a>]</p>
<p>An applet reads tilt sensor values from my laptop, posts them to <a href="http://sensorbase.org">sensorbase.org</a>, then a webpage running ajax reads the sensor values and changes a background color. LIVE.  </p>
<p><del datetime="2008-10-05T16:21:43+00:00"><br />
It&#8217;s super slow right now because I can&#8217;t figure out how to get sensorbase to  only send me the latest value in the dataset, so i have to poll through a ton of values until i reach the end of the set.</del> Last polled id number is written and read from a txt file to keep count.  Live tilt values to web color updates every 500 milliseconds now.</p>
<p><span id="more-871"></span></p>
<p>Procesing Code:</p>
<pre><code>//slog tilt sensor to sensorbase.org example
//cwwang.com

import processing.net.*;
import sms.*;
int x,y,z;

//Client c;
String data;
//boolean httpRequestDone=true;

void setup()
{
  size(200,200);
  //c = new Client(this, "yoursite.com", 80); // Connect to server on port 80
}

void draw()
{
  int[] vals = Unimotion.getSMSArray();

  int multip=5;
  x=abs(vals[0])*multip;
  y=abs(vals[1])*multip;
  z=abs(vals[2]-255)*multip;
  background(x,y,z);
  println(x + " " + y + " " + z);
  slog();

  delay(500);
}

void slog() {

  //i shouldn't be making a client each time, but i don't know what to do when it craps out
  Client c = new Client(this, "yoursite.com", 80); // Connect to server on port 80
  //slog to tom igoes slogger php script that lives on your server http://www.tigoe.net/pcomp/code/category/PHP/253
  c.write("GET http://yoursite.com/slogger.php?x="+x+"&amp;y="+y+"&amp;z="+z);
  // Identify yourself. must keep the space before HTTP
  c.write(" HTTP/1.1nHOST:yoursite.comnn");
  httpRequestDone=false;

  if (c.available() &gt; 0) { // If there's incoming data from the client...
    data = c.readString(); // ...then grab it and print it
    //ok to send next String
    //httpRequestDone=true;
    println(data);
  }
}
</code></pre>
<p>The processing sketch sends GET requests to <a href="http://www.tigoe.net/pcomp/code/category/PHP/253">Tom Igoes slogger</a> php script that lives on my server</p>
<p>Here&#8217;s the webpage that reads values from sensorbase.org and displays the color based on the tilt values</p>
<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;style type="text/css"&gt;

&lt;/style&gt;
    <!--<LINK href="style.css" rel="stylesheet" type="text/css">-->	

		&lt;title&gt;Live Background&lt;/title&gt;

		&lt;script type="text/javascript" src="ajax.js"&gt;&lt;/script&gt;

		<!-- Local Javascript Functions and so on -->
		&lt;script type="text/javascript"&gt;

			// A variable to hold the interval id
			var interval = null;	

			// A function to call our AJAX PHP script
			function call_ajax()
			{
				makeHttpRequest('getSlog.php',ajax_return);
			}

			// A function that gets called when ajax returns
			function ajax_return(response)
			{
				document.getElementById('m1').style.backgroundColor='RGB('+response+')';
				document.getElementById("m1").innerHTML = response;

				call_ajax();
			}

			// Setup AJAX function, creates a timeout so that we run something periodically
			function setup_ajax()
			{
				call_ajax();
				// Keeps going...
				//interval = setInterval("call_ajax()",5000);
				// Only happens once..
				//interval = setTimeout("call_ajax()",50);
			}			

			// Register setup_ajax with the onload event of the window (when it is done loading)..
			function addOnLoad()
			{
				if (window.addEventListener)
				{
					window.addEventListener('load', setup_ajax, false);
				}
				else if (window.attachEvent)
				{
					window.attachEvent('onload', setup_ajax);
				}
			}
			addOnLoad();

		&lt;/script&gt;

	&lt;/head&gt;
	&lt;body&gt;
		&lt;small&gt;&lt;div id="m1" style="height:35px; width:100%;"&gt;
		checking sensorbase.org...
		&lt;/div&gt;&lt;/small&gt;

	&lt;/body&gt;
	&lt;/html&gt;</code></pre>
<p>To make the httpRequests you need the <a href="http://cwwang.com/liveweb/liveTilt/ajax.js">ajax.js</a> file. You also need the <a href="http://cwwang.com/liveweb/liveTilt/getSlog.php">getSlog.php</a> file below to request the sensorbase.org table values (uses the same sensorbase_config.php file from Tom Igoe&#8217;s example. It also uses the <a href="http://sensorbase.org/soap/sensorbase.wsdl">sensorbase.wsdl</a> file.</p>
<pre><code>&lt;?php

//get sensorbase user password etc
include "sensorbase_config.php";           

$client = new SoapClient("sensorbase.wsdl", array("trace"=&gt;1,"exceptions"=&gt;0));

$fields = "x,y,z";
$tables = "p_{$projectId}_{$tableName}";
$condition = "x&gt;=0 || x&lt;0";
$delta = 1;
$type = 'csv';
$csv=1;

//total hack to get the last $from table value
//sensorbase doesn't return in descending order?

//get sbid number from counter file
$counterFile = "counter.txt";
$cfr=fopen($counterFile, 'r+') or die("can't open file");
$sCount = fread($cfr, filesize($counterFile));
$sbid=(int)$sCount;
fclose($cfr);

while ($csv!=null)
{
$csv = $client-&gt;getData($email, $password, $fields, $tables, $condition, $sbid, $delta, $type);
$sbid=$sbid+1;
}
$sbid=$sbid-2;
$csv = $client-&gt;getData($email, $password, $fields, $tables, $condition, $sbid, $delta, $type);

//write to counter file
$cfw = fopen($counterFile, 'w');
fwrite($cfw, $sbid);
fclose($cfw);

echo $csv;
//return $csv;

?&gt;
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://cwwang.com/2008/10/02/tilt-sensor-to-live-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

