HOW-TO use the N900 as a remote flash

OK, here it is. The long awaited follow-up to the remote flash post. As per most of my how-tos, it’s not a “for dummies” version. I assume you know what you’re doing. The code is not even alpha-quality, you use it AT YOUR OWN RISK. For convenience, I’ve included an ARMEL binary so you don’t need to compile code in the SDK to test it, but you will need to edit code to make it work. Read and understand the entire post, and the code, before you try it.

OK, here we go:

  1. Fire up application manager, install Shutter.
  2. Add the shutter widget to your desktop, reboot (might not be needed in newer versions of Shutter).
  3. open up /usr/lib/hildon-desktop/shutter.py in an editor.
  4. Add the two lines of code as shown below:
  5.      # lircd is now started, so try and transmit                                                           
        start = time.time()                                                                                   
        irsend = subprocess.Popen(('/usr/bin/irsend', 'send_once', remote, code),                             
                                  stdin = subprocess.PIPE)                                                    
        irsend.stdin.close()                                                                                  
        irsend.wait()                                                                                         
        #Next two lines are added                                                                                                 
        strobe = subprocess.Popen('/home/user/strobe-test')                                                   
        strobe.wait()                                                                                         
        if irsend.returncode != 0:                                                                            
            message = "IRsend failed: %d\n" % irsend.returncode                                               
        else:                                                                                                 
            message = "IRsend took %d seconds (%s:%s)\n" %( (time.time() - start) , remote, code)             
        print message                                                            start = time.time()                                                                                       irsend = subprocess.Popen(('/usr/bin/irsend', 'send_once', remote, code),                                                           stdin = subprocess.PIPE)                                                        irsend.stdin.close()                                                                                      irsend.wait()                                                                                            #iain                                                                                                    strobe = subprocess.Popen('/home/user/strobe-test')                                                      strobe.wait()                                                                               if irsend.returncode != 0:                                                                      message = "IRsend failed: %d\n" % irsend.returncode                                     else:                                                                                           message = "IRsend took %d seconds (%s:%s)\n" %( (time.time() - start) , remote, code)    print message
  6. Get the strobe-test code here. Read the code, understand it.
  7. Compile it, or use the provided binary and put it in /home/user/

You’re good to go! To use it, open the camera cover, close the camera app, then point your N900 at your Nikon and press the shutter widget. Of course the camera needs to be in the remote IR trigger mode for this to work, instant shutter release.

Note that if you update Shutter, you’ll destroy your edits, so it’ll no longer  fire the strobe.

Advertisements

5 Responses to “HOW-TO use the N900 as a remote flash”

  1. […] Using the N900 as a remote flash UPDATE: How-to now online here! […]

  2. Hello,

    I have some trouble to get it work. I’ve added the two lines.
    Buit I don’t know how to compile the file. I’ve only copied strobe-test in my user folder.
    Remoting the Pentax works, but no flash on my n900. Camera lense is open, too.
    Please can you give me some help how to compile or give me a solution for my setup?
    Thank you very much
    Rico

    • Have you tried running the strobe test manually to check it works? Just run it from the command line. It may be it needs recompiled against PR1.2. I can’t test it myself as I had to return the N900.

      • manually testing strobe-test I get a syntax error: strobe-test: line 1: syntax error:word unexpected (expecting *)*)

        Can you give me a link how to compile for n900?
        Thanks :-)

  3. I’ve solved my problem. I had to set the correct user rights to run strobe-test. chmod +x was the solution! Thank you, very great idea!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: