I bought a new doorbell. It actually came as a set, with two ringers. One is battery operated and the other is mains powered, plugging straight into the wall. I once again find myself attempting to keep up with Nick. Having seen his doorbell projectI knew exactly what I had to do: it was time to hook my doorbell up to an Arduino board and put it on the internet.
The red wire is +3V, the black is ground. The doorbell chime unit used to draw its power from two AA batteries, so now it gets the same three volts from the Arduino instead.
The short dangling white wire is actually the antenna for wireless reception of the signal from the remote button, while the long white wire once completed the circuit to the buzzer. The Arduino treats it as an analog signal (and uses the built in pullup resistors to ’steer’ the input to high). I should probably use it to drive a transistor to close a digital switch instead. This way works for now though.
Here’s the Arduino sketch (tweaked slightly from Nick’s blog post).
int ledPin = 13; // LED connected to digital pin 13
int potPin = 0; // white doorbell wire to analog pin 0
int val = 0;
long time = 0;
long debounce = 5000;
void setup() {
pinMode(ledPin, OUTPUT); // sets the digital pin as output
Serial.begin(9600); // open serial port at 9600 baud
digitalWrite(14 + potPin, HIGH); // set pullup on the analog pin
// (analog 0 = digital 14, a1 = d15, etc)
}
void loop() {
val = analogRead(potPin);
if (val < 100) { // if the circuit is completed
// (for me, it generally drops from 1023 to ~ 15 when 'ringing')
if (millis()-time > debounce) {
Serial.println(”ON”);
digitalWrite(ledPin, HIGH); // sets the LED on
delay(500); // …wait for half a second
digitalWrite(ledPin, LOW); // and turns the LED off
time = millis();
}
}
}
To hook it up to my house’s twitter feed, I just need to open the serial line on the attached computer, doing something like this every time a new line is added
curl -u email@example.com:password -d status="There's somebody at the door" http://twitter.com/statuses/update.xml
I’ve been hunting for a Mac equivalent to Windows Live Writer. Here’s my personal checklist/wishlist of what an offline blogging tool should do.
Ecto (Mac & Windows)
MarsEdit (Mac only)
Qumana (Mac and Windows)
Windows Live Writer (Windows only)
Easy (mouse-free) way to add links by selecting text
+ [1]
+ [2]
+ [3]
+ [4]
WYSIWYG / rich text editing
+
-
+
+
WordPress categories
+
+
+
+
WordPress tags
+
+
-
+
Scheduled posting
+
+
+
+
Easy to add Flickr photos
+ [f]
+
+ [e]
+ [!]
Easy to add YouTube (etc) videos
+ [e]
+ [e]
+ [e]
+ [!]
Undo
+
+
+ [w]
+
Creates nice clean HTML
+ [u]
+
+
+
Post to blog as draft
+
+
-
+
File upload
+
+
+
+
Web preview mode (what will it look like on the blog)
-
+ [f]
-
+ [!]
+ = yes - = no (or if it’s there, I couldn’t find it) [1] = ⌘+U (or Shift+⌘+U to use clipboard text and bypass the dialog) [2] = ⌥+⌘+A (or Shift+⌘+A to use clipboard text and bypass the dialog) [3] = Shift+⌘+L [4] = Ctrl+K [f] = with a little bit of fiddling [e] = via HTML embed codes
[!] = really stupidly wonderfully easy [w] = only in WYSIWYG mode, for some reason [u] = Generally not too bad, but <span style=”font-style: italic;”> rather than <em>? Urgh.
Windows Live Writer is by far the best blogging tool I’ve ever used, but sadly it’s Windows only. It’s the benchmark by which I’m judging the others, but it would get big additional bonus points (if points were being given) for making it stupidly, wonderfully easy to insert Flickr photos and YouTube videos, without even needing to paste any HTML. Pasting in the URL for a Flickr photo / YouTube video into the editor is enough to make it do the right thing, which is a wonderful timesaving feature. The web preview auto-detects what your blog looks like, which makes an accurate preview trivially easy too.
Qumana is free, but a bit ‘monetized’ (there’s an Insert Ad button I have no interest in using, and the website says things like “Make money from your blog content by inserting the ads of your choice…”) but it’s nice enough. Each post automatically includes a “Powered by Qumana” link, which can be deleted by hand. The biggest problem with it is that alt+left/right doesn’t do anything, and instead you have to use ⌘+left/right to jump left/right by one word which is just wrong (or at least grossly inconsistent with every other Mac app I’ve ever used). Given my desire to use the keyboard for just about everything I do, this alone is a showstopper.
Ecto costs $17.95. Flickr support comes via a plugin, but sadly the output doesn’t follow the Flickr terms of service (the image should link to the photo page, but doesn’t until you add the link yourself). Rich text editing is nice though.
MarsEdit costs $29.95. It’s Flickr tab makes it very easy to add your own photos. No rich text editing but does have nice support for macros. If you don’t mind getting your hands dirty with some HTML, it’s great.
Depending on whether you like hacking HTML or really need a rich text editor, you’ll probably prefer MarsEdit or Ecto respectively. I’m enjoying MarsEdit enough to stick with it for now. I still have yet to find anything quite as nice as Windows Live Writer on the Mac though. Have I missed any?
Nick has already written a nice introduction to using the Google Chart API for drawing charts of household power consumption over time. I’ve been playing with some other parts of the API as part of setting up a web-based dashboard so Rachel and I can keep an eye on our house’s power (as monitored by the Current Cost meter) from the living room computer and our own laptops.
First, I also started playing with what Google describes as Google-o-meters. For example, a basic dial can be created like this
For power readings, I’d prefer to have the colours go from green through yellow to red, and since the colour argument takes an optional 4th component for opacity (00-ff), let’s try making it semitransparent too.
I’ve been spending some time thinking about alternatives to line graphs (or sparklines) for plotting daily power consumption. I’m really liking the radar chart option. These look a bit like this.
(using cht=r for straight lines, and again with the same data but using curved lines, thanks to cht=rs)
It seems quite well suited to rendering 24 hours of power consumption. Like so.
http://chart.apis.google.com/chart
?cht=r (and rs for splines)
&chs=300×300
&chd=s:QKKHHHHIG9JwpHIXddcbUMRUQ(using simple encoding)
&chco=FF0000
&chxt=x
&chxl=0:|0|1|2|3|4|5|6|7|8|9|10|11|12|[etc...] (labels)
&chm=B,FF000040,0,1,0|h,00004444,0,0.5,1|h,00004444,0,1,1(rings at 50 and 100%)
That was a Saturday. Can you tel when we got up and switched on the (power-hungry) electric shower? On a weekday, that initial spike comes a bit earlier.
Even better, I can overlay the daily plots from a whole week in one chart. Using semi-transparent shading helps create a sort of heat-map thingy, thusly.
http://chart.apis.google.com/chart
?cht=rs
&chs=300x300
&chd=s:CBBBBBBBBDXcCBCCXQFFFGEDC,CCBBBBCbTZMCECCCTORRFFFCB, [...] (one per series)
&chxt=x
&chxl=0:|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23
&chm=B,FF000066,0,1,0|B,FF000066,1,2,0|[etc, shading for each series]|h,00004444,0,0.5,1|h,00004444,0,1,1
It looks as though most of our power is spent in the mornings, largely due to the electric shower.
I was at Game Camp 08 on Saturday. It was held in Sony’s 3Rooms building near Shoreditch which is amazing. Imagine your dream flat, but full of rather more PS3s and PSPs than you could ever need. That said, the Sony branding wasn’t actually overpowering, and the venue was a very good choice.
The day was held in the style of a barcamp, with sessions run by participants. There were sessions on ‘How to play Doerak, a semi-russian card game’, ‘ARGs, are they f****d’?', ‘Playing SLorpedo (mixed reality naval warfare in Second Life)’, and many many more.
Bobbie Johnson of the Guardian organised the event and has since written up a conclusion as well as a quick review of one of the busiest sessions, Matt Biddulph on ‘hacking game controllers with Arduino’.
I joined the IBM Hursley ETS (Emerging Technology Services) team just a few weeks after their first Rocket Day in 2005. Today was version 2.0, and it was the most fun team-building day out you can imagine; a field full of geeks and their (water, air and coke-and-mentos powered) rockets, cameras, access to good food and great beer. Good times.
Best of all, Rob made a video which includes some footage captured using a tiny camera fixed to the nose of one of the rockets. There’s a long version on YouTube. Here’s the short ‘trailer’ version (music by yours truly).
A Spime is a location-aware, environment-aware, self-logging, self-documenting, uniquely identified object that flings off data about itself and its environment in great quantities
I can make Blogjects now because the semantics are immediately legible — objects, that blog. Tonight, I can go into my laboratory and begin to experiment with what a world might be like in which I co-occupy space with objects that blog.
Blogjects track and trace where they are and where they’ve been;
Blogjects have self-contained (embedded) histories of their encounters and experiences
Blogjects always have some form of agency — they can foment action and participate; they have an assertive voice within the social web.
The last point is important, and while he’s not expecting them to pass the Turing test, they need to interact. Good bloggers don’t ignore their comments; thats where most of the fun happens. In the same way, blogjects participate and converse both between themselves and with us.
The significance of the Internet of Things is not at all about instrumented machine-to-machine communication, or sensors that spew reams of data credit card transactions, or quantities of water flows, or records of how many vehicles passed a particular checkpoint along a highway. Those sensor-based things are lifeless, asocial recording instruments when placed alongside of the Blogject. … The social and political import of the Internet of Things is that things can now participate in the conversations that were previously off-limits to Things. … Things, once plugged into the Internet, will become agents that circulate food for thought, that “speak on” matters from an altogether different point of view, that lend a Thing-y perspective on micro and macro social, cultural, political and personal
matters.
If a blogject is an object that blogs, a tweetject is clearly an object that tweets (an intransitive verb: the act of using Twitter).
There are already lots of examples of objects using Twitter to interact with people, usually to report about the state of things in a convenient form. Botanicalls is an interesting project, aimed at “enhancing person-plant communication” using tools that can be used by people as well as plants. As a result, Pothos is a plant that knows when it needs watering (learn how to make your own).
Gareth Jones wrote about getting his laptop to tweet when Bluetooth devices come in and out of range. For a while that script was updating as gareth_laptop on Twitter. As long as some relevant mobile phones and laptops have Bluetooth enabled, there are some useful and interesting elements of personal presence detection here. Who is nearby? With some additional second-order agents running to work out what these devices are and what they mean (is Gareth at home? If he’s at work, who is nearby?).
Andy Stanford-Clark has an impressively complex home automation setup in his house on the Isle of Wight. It’s been online for a few years already, but has more recently been exposed via Twitter as andy_house. (Although Kelly raises bots as one of her Twitter pet peeves, she makes an exception for Andy’s house.) Andy also Twitter-enabled the Red Jet ferries which go to and from the Isle of Wight, where he lives.
There are many more, and lots more will no doubt be added this year. Currently, most Twitter bots are one-directional. Things will get really interesting when more of them converse as well as simply report.
Everyware by Adam Greenfield is relevant, though it deals mainly with the near-term. Andy Piper has a review which you might find helpful.
OpenSpime is a project to enable “individuals and corporations to better understand their environment, through the use of a series of GPS-enabled sensors”. Read Tish Shute’s introduction on UgoTrade too.
Ever since the Dedicated Followers of Fashion post about laptop stickers used a photo I’d snapped of Cory Doctorow’s heavily stickered ThinkPad, I’ve been a(n even) keen(er) observer of laptop stickers and their owners. I’ve been avidly photographing them, uploading them to Flickr and tagging them ‘laptopstickers‘. Here are a few examples.
(Sparse. As with Dan, you’d know Ren is a game geek pretty easily)
Having bought a MacBook Pro in January, I decided it was finally time to plaster it with stickers. It helps me get past the new-car feeling of having to keep it perfect, and since there are a lot of identical MacBook Pros out there, some personalisation is helpful. I figure that I’ll keep adding them, and if they peel off I’ll just add more. It’s a bit of a release not to be so concerned about the way it looks, though I was ironically obsessive about getting the right stickers before I began.
I’ve been collecting them for some time, but didn’t want to start putting them down on the lid until I had enough to give a good covering. SXSW was a great venue to pick up fun and relevant stickers, and Coté was kind enough to send me some too.
Incidentally, this is the reason I had the Autobots logo etched onto the bottom of the machine rather than the lid; I’d known since I bought the MacBook Pro that the lid was going to be en-stickered, and the laser etching opportunity, while too good to miss, seemed best placed underneath. It gives a chance for surprise and delight, too.
Three different physics games I’ve been enjoying recently. You might like them too.
1 - Toribash (Mac, Windows) is my favourite fighting game ever. The physics, rendering and tense multiplayer action make it an instant addiction.
2 - Crayon Physics (Windows) is the freeware prototype of something which went on to become the eagerly awaited Crayon Physics Deluxe (the one shown in the video below).
3 - Phun (Windows and Linux) is a fun 2D physics playground. Experiment with gravity, friction, springs, motors, and more. It looks a bit like this
It seems to be inspired by the MIT Magic Paper demo (shown in the video below).
Macs. PowerBook, MacBook, MacBook Pro, MacBook Air, … pretty much everyone I know carries one. Outside of IBM, at least; with few exceptions, most IBMers have use of a Lenovo ThinkPad for work.
Although I’ve actually owned a Mac (Mini) for years, but never really felt like a Mac owner until now. Even having bought a MacBook Pro (I went for the 2.2 GHz, 15.4″ version) of my own I have not exactly switched so much as finally bought a laptop which actually belongs to me. I’ll continue to use my ThinkPad T42p for some worky things (and it’s nice to have both), but I’d expect to use the Mac more and more.
Like the Moleskine (which I’m convinced is what a Mac would feel like if it were made of paper) the MacBook Pro is a machine which asks to be touched. Everything about it looks and feels good. It’s full of surprises too. The LED next to the camera wasn’t a surprise (I’d wondered if it had one) but it was nicely hidden. The way the screen dims and the keyboard illuminates automatically, based on the ambient light in the room, continues to surprise and delight me. In fact, putting my hands over both speakers is still my favourite party trick.
Applications
Of course, the machine is a small part of the story, and like so many small parts, It’s what you do with it that counts.
Before I even bought it, I ordered the Mac Heist bundle, which includes
TaskPaper (which I really like, but can’t help wishing I would sync with Todoist. I’m unlikely to use both)
… and lots of other things which are interesting but not the reason I bought the bundle.
I bought iWork with it, and also installed Quicksilver (on the sage advice of a friend who follows the 43 Folders blog more closely than I), Firefox (I still prefer it to Safari) EVE Online and Second Life. I’m thinking I probably need/want TextMate, Aperture, … what else am I missing?
Quirks
There are some things I’m still trying to get used to. I’m not going to point out the power of right-click, because Ctrl + click is fine. Honestly. But even the keyboard still baffles me somewhat, mainly because I’ve spent many years perfecting my keyboard navigation skills in Windows . If I used the mouse more, it wouldn’t matter, but in my head, Ctrl + left means jump left one word. Combine it with Shift and you select the previous word. I’m struggling with doing this with different modifier keys, and it’ll take a while before it feels natural. I’m not saying the way it’s done in Windows is right, just different.
A bigger issue is Tab. I try to use only the keyboard as much as possible, especially when typing. Tabbing between fields in a form is much faster than pointing and clicking. Firefox continually surprises me by not treating non-text fields (such as checkboxes) as something I can click by Tab, then Space to toggle the checkbox. Am I missing something? Tab jumps over the checkbox altogether (often taking focus back to the address bar) and I’m forced to take my hand off the keyboard, point, and click. [Update: found it. Ctrl + F7, or System Preferences | Keyboard Shortcuts | Full keyboard access: if windows and dialogs, press Tab to move the keyboard focus between: Text boxes and lists only / All controls]
When a dialogue box pops up, does Enter mean OK? It seems to, but what if I want to click the 2nd button. Normally I’d hit left, or Shift + Tab or something, then Space. By I don’t get any on-screen hints as to which is the active button, or what keyboard shortcuts I can use.
Veteran OS X users are probably laughing at me for all of this, so please do share your mouse-free power user tips.
Why not an Air?
I’ll be the first to agree that the Air looks great, and would be even nicer to carry around than the Pro. For me, the power/price/weight ratio was wrong. What I wanted was a 12″ MacBook Pro. The Air isn’t that. It’s small, yes, but not powerful enough for a primary machine. Add the CPU upgrade and it costs more than the cheapest 15″ Pro, which outperforms it in every way except size and weight. No contest (for me), and at least the Pro is still no heavier than my ThinkPad T42p. I’ll still drool when I do pick up an Air, of course.
Along with yesterday’s Macworld conference (MacBook Air… mmmm…) CES, the Consumer Electronics Show, is one of the highlights of the geek year. New devices are announced and launched; bigger televisions, smaller mobile phones, faster, better, now!