Networked Objects

Blog Archive

About Me

Saturday, May 5, 2007

這禮拜咱們(英譯: Networked Objects)課程assignment狠過癮! 要來玩弄電玩史上經典之一的Pong game! (聽起來好像porn game, 對不起發音太差)I've never seen a so crowded classroom! The ethernet cables are insanely crawling throughout the table. I barely squeeze into the crowd and share the tiny space with Greg. Crazy but fun!

Basically we are using the same code from Tom. The only thing we have to deal with is a small change of analog/digital input. I chose the digital instead of analog input due to some suggestion form Josh who took this class in the last semester. From his saying, digital input could get more stable and continuous move of your pong paddle than analog (Actually it depends on how you write your code). Though getting a big help from Josh, I still struggled with the never-expectable hardware part. At the beginning, the signal only appeared on the serial monitor but terimanl. It took me a while to figure out that I shouldn't have hooked up the Xport's RX and TX to FT232R's TX and RX. Instead, they should go to arduino's TX and RX since FT232R in my circuit only did a job of providing 3.3V power and did nothing about transferrinf/receiving data. What a silly mistake!

Here is the circuit i got:The physical interface: a small block with 2 switches locate seperately inlayed into its right and left surfaces.Playing with the block:

This video shows all steps of logging in/out the pong game server. Instead of really receiving/transferring data from/to the server, I fake it by typing comments in Terminal for a rehearsal test. 'C' means that the server sends a connection signal through Xport to arduino (in real playing, the connection is automatically made once i plug the Ethernet cable into Xport), and then I press a connect button on my breadboard to start the game. Several lines of 'C128.122.151.128/8080' instantly jumps up. Next step is to simulate the control of pong paddle. Pressing right button (R side of the block facing down) appears 'r' on Terminal screen while left button shows 'l'. Once I press the connection button again, I lose the connection and 'x' jumps out, which means sending a signal to ask the server to quit. DONE!

Saturday, April 21, 2007

How can we encourage the use of recycling bins?Give the user feedback and Make it more fun- Show them their current contribution- Display total trees saved by using this bin

Hence... the Better BinLets users know they are REALLY making a difference

The hardware:Platform (made out of wood. lol!)(show pictures of platform)

4 FSR sensorsArduino + Xport

The Pseudo Code:Php/MySQLCode runs every 30 seconds:(actually it's 10 seconds while in presentation's demo)Arduino gets latest value (weight) inserted into DBIf current weight in bin is > latest value, update db with new value and timestampThis is our daily scratchpadAt the end of the day, this latest bin value is inserted into a new table called DAYSSimilarly, at the end of the month, all values from last month are entered into a separate monthly table as well.So at anytime we can reference the LATEST, DAILY, MONTHLY or TOTAL recycled weight.

The Visualization:Flash & ActionscriptThis is our elegant, visual compensation for good recycling habits.(show picture and explain how visualization works)

Sunday, April 15, 2007

Greg and Guy are working on a great, meaningful and so environmental issue project! (Wow, it's so not my style) Basically the idea is to weigh the recycle bin on the floor by couple sensors and send the data onto a database.