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.

arduino/wiring
iPhone

Permalink

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 »

arduino/wiring
circuits
electronics

Permalink

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.

OSX
electronics

Permalink

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 »

arduino/wiring
circuits
electronics

Permalink

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 »

arduino/wiring
circuits
electronics

Permalink

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 »

PHP
Processing
arduino/wiring

Permalink

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 »

Processing
circuits

Permalink

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 »

PHP

Permalink

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 »

PHP

Permalink

Traceroute scraper in Processing

There are many web-based interfaces to traceroute available, including a nice list at traceroute.org.  Here’s a Processing sketch that retrieves the raw HTML from one of them and separates the traceroute lines into time taken, hop IP, and hop name.

This sketch can be modified to scrape other web-based traceroute apps, but you’d need to change the last two methods, parseHop() and printHopList(), depending on how your particular app formats the results. You’d also need to change the global variables at the top that pertain to the site being used.

One caveat: the traceroute takes some time.

To see the full output of the HTML call, change debug to true.

Continue Reading »

Processing

Permalink