?

Log in

No account? Create an account
LJ Mood - Artur Bergman [entries|archive|friends|userinfo]
Artur Bergman

[ website | O'Reilly Radar ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

LJ Mood [Dec. 8th, 2005|10:30 am]
Artur Bergman
[Tags|, , ]
[Current Mood |cheerfulcheerful]

So I have always wanted an Ambient Orb, but haven't been able to get one because they don't work outside the US, now that I am here I am free to play with them. Ben Trott kindly gave me one he wasn't using to play with.

After a night of hacking with daveman692 we managed to hook up the orb to the mood of livejournal. It was a nice piece of hacking and it felt nice to be actually just hack on a nice little project.

Essentially we are requesting the latest posts feed every 10 seconds, parsing out the lj:mood tag and aggregating it up for 10 minutes, then we walk through and calculate the percentages of moods against a list of moods and values between 0 (good) to 100 (bad). This ends up with a plot on the scale somewhere between 0 and 100 with 50 in the middle. The list of moods was made very unscientifically by me and daveman692 and we stumbled on some. (How would you rate "iced").

Then we keep track of the min and max we have ever seen and the point we are currently in between, so we can self calibrated. We realised that using the absolute value wouldn't really work since it would never move very far away from midpoint.

All in 50 lines of code or so.



This morning it wasn't very happy.



But as the day progresses it has gotten a bit more happy.

Now I want to add lj:mood data to the atom stream.
LinkReply

Comments:
[User Picture]From: lisa
2005-12-08 08:01 pm (UTC)
Now we need a cam on that thing with a link from the front page.
(Reply) (Thread)
[User Picture]From: qfemale
2005-12-08 11:08 pm (UTC)
wildly agreed!
(Reply) (Parent) (Thread)
[User Picture]From: crucially
2005-12-09 03:06 am (UTC)
wouldn't be a bit too meta?
(Reply) (Parent) (Thread)
[User Picture]From: floatingatoll
2005-12-09 03:44 am (UTC)

No.

Isn't asking how meta an orb that monitors the "meta" mood of LiveJournal a rather meta thing itself?

Where's the webcam?
(Reply) (Parent) (Thread)
[User Picture]From: qfemale
2005-12-09 09:43 am (UTC)
erm... no?
me = LJ addict!
It would be nice if I went to the startpage or something to see how my Lj-baby feels!! *lol*

please ignore me, haven't had my coffee today ;-p
Mmm I need an lj mug!!!
(Reply) (Parent) (Thread)
[User Picture]From: claystorm
2005-12-10 03:16 am (UTC)
Agreed and you could even make it an content module / addon for the portal / MyLJ page.
(Reply) (Parent) (Thread)
[User Picture]From: pne
2005-12-08 08:55 pm (UTC)
How do you feed it data?

The page said it automatically connects to a "nationwide wireless network" (which sound bunk to me, given the range of WiFi)...
(Reply) (Thread)
[User Picture]From: xb95
2005-12-08 09:59 pm (UTC)
It's a pager device. So yeah, nationwide wireless network.
(Reply) (Parent) (Thread)
[User Picture]From: crucially
2005-12-08 11:01 pm (UTC)
It just uses a special url to their website,

basically you send

http://www.myambient.com:8080/java/my_devices/submitdata.jsp?devID=YOUR_DEVICE_ID&color=$orb&anim=0

and it changes color over their wireless pager network..

so cool :)
(Reply) (Parent) (Thread)
[User Picture]From: 294729472749274
2005-12-15 11:36 pm (UTC)
I'm amazed.

(Reply) (Thread)
[User Picture]From: desh
2006-07-05 03:25 pm (UTC)
Can I have whatever code you use for this, please? I'm going to do something similar at work with my new orb.
(Reply) (Thread)
[User Picture]From: crucially
2006-07-05 03:35 pm (UTC)
Sure, drop me an email and I will send it to you.
(Reply) (Parent) (Thread)
[User Picture]From: desh
2006-07-06 03:28 am (UTC)
Sent. Thanks!
(Reply) (Parent) (Thread)
[User Picture]From: crucially
2006-07-06 06:23 pm (UTC)
You should have it know.
(Reply) (Parent) (Thread)