I finally came around to trying out LIRC on the Raspberry Pi to use it to trigger my Nikon D5100. 😀
I haven’t fully utilized the capabilities provided by it yet, but I’ve managed to get it up and running quite easily thanks to a lot of great posts and troubleshooting guides on some blogs and the Raspberry Pi forum.
I mainly followed these links:
To make a very simple remote using the Raspberry Pi, all you have to do is follow the steps given on either of these links.
Since I didn’t really have the physical Nikon ML-L3 universal remote which I wanted to emulate, I followed the steps given on these links after which:
1. I upgraded the firmware:
sudo apt-get update sudo apt-get upgrade sudo rpi-update
2. Got the Nikon ML-L3 lircd.conf file:
and replaced the contents of
3. Restarted the lirc daemon:
sudo /etc/init.d/lirc restart
4. Checked if the remote was configured correctly:
irsend LIST Nikon2 ""
This should show a list of the commands offered by the remote for triggering the shutter.
5. Tested the shutter command:
irsend SEND_ONCE Nikon2 shutter
6. Once that worked properly, (after a silent fist-pump) I decided to write a small python script that I can use for Timelapse shoots:
#Created: 09-07-2014 AM 02:38 #Author: Mayank Joneja #https://botmayank.wordpress.com #Timelapse code for Nikon Cameras using the Raspberry Pi (LIRC) #IR LED on GPIO 22 , usage: #sudo python NikonCamera.py [no. of shots] [delay in seconds] from time import sleep import subprocess import sys if(len(sys.argv)<3): print "usage: 'sudo python NikonCamera.py [no. of shots] [delay in seconds]'" else: shots = int(sys.argv) delay = float(sys.argv) for i in range (1,shots+1): subprocess.call('irsend SEND_ONCE Nikon2 shutter',shell = True) sleep(delay)
I’m quite happy with this setup as of now, but I plan to hookup a TSOP and make a small setup for recording and transmitting IR signals with the Pi. I guess I’ll then have a simple Flask based web-app for such an IR blaster.
I haven’t really tried out the range of the setup yet but I think in case of any issues I’ll simply amplify the signal with an NPN transistor like a BC547 and add another LED in parallel for better coverage angle. I’ll post any updates on this project as and when I get to them.
P.S.:I hope to click a nice timelapse sequence with this camera ASAP and upload that too. 🙂