Networked Bed Presence sensor

John Schimmel and I had a meeting with a friend the other day who has chronic condition, and is looking for tools to notify her family and friends of her activity at home, so she can live more independently. A lot of good ideas came up, making for a potentially exciting project that’d be useful someone we care about: a win-win situation.

One of the ideas she had was a bed sensor, which would let her family know whether she’s in bed or not, so they can call to either wake her up, or tell her to get some rest if she’s up too late. Inspired by Mustafa Bagdatli and Diego Rioja’s BedData project, and assisted by them, we thought we’d see if we could put something together quickly, connecting force sensing resistors to an Arduino and using an Ethernet shield to upload data to Pachube.  The project has not been tested in the field yet, but it’s working in the lab, and was simple to set up.  It may be a useful example for other sensor projects.

Continue reading

Posted in arduino/wiring, circuits, electronics | Tagged , , | 1 Comment

Serial ports on an iPhone?

hc gilje posted some useful notes on accessing the serial ports of an iPhone. Bottom line:

Apple has not made it easy to let the iphone communicate with external devices. Basically, you need a jailbroken phone to do anything.

That said, his notes are useful for anyone who’s really really got to get at the serial port.

Other ways of getting sensors into the iPhone include Tellart’s NADAMobile, which uses the microphone input as an analog input, and Brian Jepson’s PhoneGap solution, which uses ethernet and an ethernet shield.

Posted in arduino/wiring, iPhone | Tagged , | Leave a comment

Using PepperMill to turn a motor into a sensor

Nicolas Villar sent me a sample of the PepperMill, a new sensor board he and Steve Hodges designed at Microsoft Research in Cambridge, UK.  It’s a nifty little board.  You attach a DC motor and the board can an output voltage when the motor is turned,  and analog signals telling you the direction and speed of the motor.  It turns a DC motor into a rotary encoder, of sorts.

Continue reading

Posted in arduino/wiring, circuits, electronics | 3 Comments

Rob Faludi just turned me on to CoolTerm, a serial terminal app for OSX and Windows. It looks like a nice addition, and is cross platform, which is handy for teaching; no need to reference different apps on different platforms. I’ve only tried it out a little, but so far, it’s nice. You can have multiple ports open in multiple windows, and you can see bytes in ASCII or hex. It’d be nice to see them in decimal too, but that’s just a wish.

Posted in OSX, electronics | Tagged , , | Leave a comment

Bluetooth Mate with Lilypad

Coming late to the game, I’m trying out a Bluetooth Mate from SparkFun with an Arduino Lilypad.Overall, it’s a nice Bluetooth radio to use with microcontrollers.  A few thoughts on getting it working:

Continue reading

Posted in arduino/wiring, circuits, electronics | Tagged , , | 1 Comment

Intervalometer and motion trigger for Nikon D90

Matt Mets has written a nice Nikon remote control library for Arduino. I used it to make a motion trigger and intervalometer. It looks like this:

Continue reading

Posted in arduino/wiring, circuits, electronics | Leave a comment

Blog Housekeeping

I’m making some changes to this blog. I’ve been unhappy about the fact that all the code is static, not the code I use every day. Instead, I want a nice code repository, so whatever I write on my machine can be published directly, and if I update it, the updates end up here. I would also like syntactical highlighting of the code. And now, ta dah! It’s all done. Here’s what I did, for your reference and my own, because I’ll forget next time I need to update it.

So from now on, new code on this blog will look like this:

void setup() {
 Serial.begin(9600); 
}

void loop() {
  Serial.println("Hello from Tom!");
}

And it’ll all be updated whenever I make changes.  Exciting, isn’t it?

Continue reading

Posted in PHP, Processing, arduino/wiring | Tagged , , | Leave a comment

Reading data from a uLog logger, saving to a file

Here’s a Processing sketch that takes data from Sparkfun’s uLog datalogger via a serial port, and saves the results to a file. To use this, you’ll need:

Continue reading

Posted in Processing, circuits | Tagged , , | 2 Comments

Simple Client URL example in PHP

Here’s a simple example of using the cURL program through PHP’s client URL library. It’s a really powerful way to use HTTP, because you can set just about every HTTP option using the library.

Continue reading

Posted in PHP | Leave a comment

Mail form in PHP

Here’s a simple HTML/PHP form that takes data from the form and sends it in mail via HTTP POST. Save it as formToMe.php:

Continue reading

Posted in PHP | Tagged , , | Leave a comment