So far the setup seems to work well, but the sensor readings regarding the temperature look a bit high (maybe influenced by the Arduino which gets warm over time … its probably better to place the sensor away from the board, and not right on top of it).

Just a snipped of code that I have found for creating a candlelight-like light with a yellow LED attached to a PWM port of an Arduino (called here ledPin). You could probably add another red LED to optimize the effect, but for a first try it does not look too bad.

I have created a holder that can be used to attach my Arduino-based camera remote to the hotshoe of the camera. The file was created in the CAD software Rhinoceros and printed on a MakerBot Replicator 1 owned by the University I work at. Its a rough first try, but the device works.

Just some brief notes on how to post status-updates to status.net from an Arduino with an ethernet shield. Status.net is an open source micro-blogging solution that is used for example by the Twitter alternative identi.ca (so it should work with identi.ca, too, but I have not tested it so far).

Posting to status.net is actually very straightforward. You just need to send a simple HTTP POST-request with your login credentials and the message you want to send (there are other optional parameters such as the source of the post or your geo-location, check the API description if you want to use those).

The message you want to send needs to be URL-encoded, which basically means that you have to exchange certain characters (!*'();:@&=+$,/?#[])with codes. For example, a whitespace becomes %20, so “This is a test” would become “This%20is%20a%20test”. Check this site to find out how to encode other characters.

Your login-credentials also need to be encoded, but this time as Base64. There are several websites that will enocode your credentials for you, check for example this site. Enter your credentials there in the form of username:password and you will get a result such as dXNlcm5hbWU6cGFzc3dvcmQ= which needs to be entered into the code. Obviously, username and password have to match an account at the server you are posting to.

If you got this, you are ready to go. Just start an Ethernet connection with your Arduino (using the Ethnernet library) to the IP address of your status.net server. You can find out how to use EthernetClient with Arduino here.

If the connection was initialized, perform the following HTTP request that is based on the examples described above:

The first line defines the url of the statusnet api (the path may need to be adjusted to the correct url of your server), and adds the URL-encoded status message as well as the source of the post. The second line provides the basic HTTP authentification as a Base64 string. The third line sends an empty line to signal the server that the HTTP request is completed.

I have updated both the hardware setup of my camera remote as well as the software that is used to control the Arduino.

With regard to the hardware, I have soldered the optoisolator and capacitors to a small board. I also bought a remote cable for the Nikon D200 and connected it to my optoisolator, so that the setup can now be connected more easily to the camera.

The revised hardware part (the pins can be connected to the Arduino ports 13 and GND). Note that the setup can also be used for different brands of cameras by using a different adapter.

Here is a description of the circuit:

The simple circuit (note that the type of optoisolator given there is different to the one I used; could not change that in the software somehow).

With regard to the software, I updated my app with further modes for interval shooting and bulb (apart of the existing self timer mode). The new version of the app depends on Android 4.0 (ICS) in order to work properly, as I used the advanced number pickers that are not available in the older versions of Android.

The start screen of the App.

The interval shooting mode. You can pick the pause between the shots, as well as how many pictures you want to have taken (as the Arduino keeps track of time etc., the App can be closed after triggering the interval shooting).

Recently I have been experimenting with interfacing my Ardunio Uno with my Nikon D200 DSLR. The D200 has a connector for a remote control cable that consists of 10 pins. After some research on the web I was able to find some information on how the pin layout works: http://www.doc-diy.net/photo/remote_pinout/#nikon. Basically, you have to connect the two pins for activating the autofocus and the shutter to the ground pin in order to take a picture.

The pin layout of the remote connector

As I do not own a remote for this camera or a cable that fits into the remote connector, I used breadboard cables which fit perfectly into the pins of the connector. With these cables and an optoisolator, it was easy to connect the camera to my Arduino board.

The remote connector of the D200

Some experiments showed that activating the optoisolator for 1000 milliseconds was a good value to activate the camera for one shot (this can also be done by simply bypassing the three cables. This opens up many possibilities for triggering the camera for example with a lightbarrier (for example using an IR diode and a photodiode), or by sound sensors or other means of activation (such as a photo resistor for detecting ambient light and automatically shooting sunsets if you are too lazy to get up early).

The Arduino board (with Bluetooth Shield), connected to the optoisolator

However, as I was recently experimenting with the Amariono toolkit (http://amarino-toolkit.net/) that enables the interfacing of Arduino boards with Android devices over Bluetooth, I decided to build a remote control App that would be able to trigger my camera wirelessly: a Bluetooth Camera Remote.

The Bluetooth Camera Remote Prototype

The BTCamRemote consists of several components:

An Arduino Uno board with an optoisolator connected to the right remote trigger pins at the DSLR.

A Bluetooth Shield (I use the one from iteadstudio.com).

An Arduino program that depends on the Amarino Library and listens to commands that are recieved over the Amarino framework (basically consisting of a certain flag and an Integer value that sets the duration for activating the optoisolator and thus the camera).

An Android cellphone (I use an HTC Legend with Android 2.2) running the Amarino App (where the connection to the Arduino has to be set-up, coupling the Bluetooth devices).

An Android App that uses the Amarino Framework to send commands to the Ardunio board when a button is pushed (the user can also set a delay before the command is sent, so you can hide the cellphone when you want to take self portraits).

This setup is not really simple (because of the many software components), but it works and can be easily extended with further functions (for example activating other pins with further optoisolators etc.). It is also possible to use the Arduino for long term exposures, for instance when taking night shots (as far as I know, the camera can do exposures up to 30 seconds without using the manual “bulb” mode; the Arduino could control exposure times that are much longer, and it could be easily made accessible with a nice user interface on the Android phone.

The Android App “BTCamRemote”

The next steps will be to solder the circuit to a (smaller) circuit board and exchange the breadboard cables with the right camera cable. I will also try to attach the Arduino board to the hot shoe of the camera, and power the Ardunio with a battery in order to make the setup more mobile and easier to carry around. It would also be nice to learn more about how the other pins on the connector work, in order to access more camera functions with my remote.

You can download the source code as well as a signed APK of the application here (note that it depends on the Amarino App that has to be installed separately): https://bitbucket.org/boden/btcamremote/

This is a small example of interfacing Arduino with Android via bluetooth. I am using a very nice and convenient framework for this: Amarino, and basically followed one of the tutorials that are featured there to build a christmas decoration that I can control with my Android phone.

The setup consists of several components:

An Arduino Uno board with a bluetooth shield (I use the bluetooth shield from iteadstudio (v2.2))

A 3-color LED that is connected to the Arduino (via three PWM digital output pins)

An Android phone that is connected to the Arduino via bluetooth (using the Amarino framework). I used an HTC Legend running Froyo (2.2).

An Android App that uses the Amarino API to control the output value of the three PWM pins on the Arduino, thus enabling the user to set the color of the LED

Here is a picture of basically the same setup, but using three different LEDs instead of one 3-colored one. As you can see, the circuit is pretty simple: the LEDs are connected to three of the PWM digital output pins (9,10,11). Don’t forget to add capacitors, or you will probably burn your LEDs at some point.

The code that runs on the Arduino board depends on the Amarino library, that can be downloaded at http://www.amarino-toolkit.net/, and is pretty much the same that is documented in the abovementioned tutorial (with some slight changes to work with my setup). Basically, I just changed had to change the baud rate to 115200 as this is recommended for my bluetooth shield.

The App that is running on my Android phone is also the same like the one featured in the tutorial. In the current version it cannot be shared as an APK, but has to be compiled as the MAC Address of the Ardunio board that has to be controlled needs is hardcoded. So you will need the Android SDK in order to get the App installed, but then it works just fine. You also need the Amarino App to be installed on your phone, and connect it to your bluetooth shield in order to get the setup to work.