Tuesday, 16 October 2012
Friday, 28 September 2012
The LCD display is very crude. However it consumes very little power, is cheap to find. It is also well supported in the Hack/Maker comunity. A small display may be usefull for initial setup or status monitoring of mobile, battery driven projects. For example it could show IP address to allow WiFi connection or could display nuber of pictures taken on an automatic camera.
There are plenty of projects relating to the LCD display found on 3310s and other phones. I purchaced some PCB sockets to connect to the IO pins of the raspberry pi from EBay.
These can be placed on the IO pins. Wires can be easying soldered to the connector before they are connected. This is ugly, but ideal and cost effective for Raspberry Pi "projects".
To talk to the LCD display you need two GPIOs and some SPI. The LCD required an addition capacitor that I fitted and the connector end of the cable. The display will just about run from the 3.3 volt supply on the IO pins but I suspect this will be the only thing you can power from this supply.
I soldered directly onto the display, this was VERY fiddly. I used standard ribbon cable, others suggest using the FFC style (Flat Flexable Cable) that can be found oinside discarded electronics such as CD dirves.
I used the "wiringPi" project for my GPIO, SPI and timing. I used one of the many AVR based LCD drivers, (I will try and post more info).
To get the SPI driver to appear I needed to edit a system file to remove the SPI from a "blacklist". Google this for now, I will try and find the link and add it here.
GPIO and SPI appear to only work if you run as su. I created a su login using the sudo passwd command to make this easier.
CONCLUSION: So far I have demonstrated that with the LCD display can be driven from raspberry Pi with only the addition of the 4.7uF capasitor. The Rapberry Pi will power and control the display. The displayed results were not as expected. This is due to known issues in the way I have ported the code from AVR to Raspberry Pi. The project is still WIP. I will try and post updates and perhaps some code when I have it working better.
Tuesday, 18 September 2012
Friday, 14 September 2012
Thursday, 13 September 2012
Saturday, 8 September 2012
This post describes a simple way to get flash video, such as YouTube, working in the midori browser. I must check this out. I think raspbmc has a YouTube plugin, but this is YouTube in a raspian browser.XBian or Raspbmc.
Friday, 31 August 2012
Tuesday, 28 August 2012
Thursday, 23 August 2012
gphoto2 was basically working. However I wanted to take continuous time lapse photographs. It appeard to struggle after 7 frames for some reason. I'm unsure if the camera's resources were running out or the RPi's. I will need to investigate. I was taking dual JPED and RAW images. I manages to "fuse" three JPEG images of different exposures into a single TIFF image. I'm not sure if it was a HDR (16 bit float?) image but the exposure was excelent across the hole image. I need to solve the 7 frame timelapse issue and find a RAW file reader. The workflow I am looking for is somthing like.
gphoto2 => Canon RAW x3 (exposure bracketed)
Canon RAW => ?pfsindcraw? => HDR x3 (exposure bracketed)
HDR x3 (exposure bracketed) => enfuse => HDR x1 (Many 8 stops + dinamic range)
HDR => pfstm => JPEG (Tone mapped)
The idea is to use the RPi to do all this on the fly, hopfully as fast as the time lapse, so that the disk space requirments are very greatly reduced as the three RAW files are converted and deleted as more pictures are taken.
Part 2 So I had some success with bits of the system. I looked at the Photography Projects thread on the raspberry.org site. I found I had to get the small C file as discussed on a linux forum and compile usbreset executable. This built using cc usbreset.c -o usbreset followed by a chmod +x usbreset. I then wrote a bash script that called usbreset /dev/bus/usb/001/00x between calls to gphoto2. I stole the bash script from the Photography Projects thread that automatically worked out where the camera was attached. I found the camera kept moving around when the camerea was swiched on and off but the script could find it reliably.
The key to the discovery of the USB device is...
dev=`gphoto2 --auto-detect | grep usb | cut -b 36-42 | sed 's/,/\//'`
I chose to call gphoto2 three times in the script to capture three images. I tried the single command line aproach shown in Photography Projects but I could not get it to work.
I used gphoto2 in --shell mode to discover the settings. Found for the canon 400D i needed to use
Other combinations of command line options did not seam to give reliable results. The thread discusses a Nikon and the use of --set-config-value, I could not get this to work as expected for me.
I used the --filename xyz.jpg and --force-overwrite although I could not get it to work as I expected if the --filename appeared more than one. Therefore used seperate command lines for each photo aquired.
enfuse worked very well. With three small JPG images at three exposures they were combined into a single JPG with superior exposure. However I ran out of memory or TMP scratch space when I tried to produce a HDR image, eg floating point or 32 bit. Having reread the manual it looks like I may be able to set the scratch directory using TMPDIR enviroment variable and also set the cache size and buffer size. There is a table in the manual that is for systems with a lot more memory. I will try a setting in the same perportions scaled to RPi available memory. Note the available memeory will depend on how you have ivided up available memory between CPU and graphics. Raeding the manual it looks like enfuse does a weighted blens so it will reduce noise if given many pictures. enfuse did not do any tone mapping so the output was a suprior exposure but still natural. I played with the pfstools but I think because enfuse generated a LDR JPEG image the results were not very spectacular. The picture were quite ordinary. I need to retry this process and I think I can make improvments.
Raw images were too large to handle and I cause errors. I will stick with small JPG files for now. I may need to revisit RAW images. I think the lack of SD card space may be adding to the problems.
I will try the following workflow.
(gphoto => small jpg ) x 3
(x.jpg x 3) => enfuse => HDR_file.??? x 1 (Format not yet known)
HDR_file.??? => pfsin => pfstmo => frame.jpg.
Wednesday, 22 August 2012
Sunday, 5 August 2012
At poundworld I bought bluetooth adapters. Not tried these yet, the one I used on RPi was on old one.
HDMIPoundWorld also had some HDMI cables, perhaps a little short. I did not get them as I have a few I bought from poundLand. The ones from poundland work fine.
Wednesday, 1 August 2012
Tuesday, 24 July 2012
Thursday, 19 July 2012
Wednesday, 11 July 2012
Monday, 9 July 2012
Saturday, 7 July 2012
Looks like the network file sharing is not working on my RPi, yet. So also installing vncviewer and pyneighborhood. Note: On Raspian I noticed that sudo apt-get install vnc-server aliases to the "tight" vnc.