Tuesday, 16 October 2012

More RAM, Raspberry Pis are shiped with 512MBs

There is a report that the latest rev 2.0 model B boards are now being shipped with 512MBs of RAM. It seams it was a surprise for some who orders have arived recently. It’s interesting there is an implication that the A board may not have the upgrade. It is possible that the economics of numbers has allowed the upgrade. Another possibility is obsolescence of the smaller devices. Would be interesting to see what the A has to offer.

Friday, 28 September 2012

3310 LCD and the Raspberry Pi

WHY?
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.

Friday, 14 September 2012

Raspberry Pi Web Server Apache2

With the latest Raspian updates, Apache2 installed seamlessly using sudo apt-get install apache2 I had googled its installation but most of the advice in the walk throughs is not needed now. I hope to get some of the more advanced features, such as scripting and databases, working. This may require more installation. Out of the box apache dishes up the default HTML page without any configuration.

Raspberry Pi and the Chromium web browser

On an updated Raspian you can install Chromium web browser. This beautiful eye candy shows off web pages, such as the BBC web site, in their full glory. However the performance out of the box is very poor. I'm on the hunt for some information to improve the performance. Perhaps a later release or better settings.

Saturday, 8 September 2012

Raspberry Pi laptop.

Watch "Raspberry Pi Laptop with Atrix 4G Dock" on YouTube

Update: 29th September 2012.
I have acquired a lapdock from eBay. I'll hopefully create a new post about it. The cables I ordered have arrived today.

Play flash videos in Midori

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.

Raspberry PI ‘RaspianHOWTO Play Flash in Midori | Lance's Blog

UPDATE: 17th September 2012 I tried this over the weekend. It is easy to do and seams to work. However the performance is poor. If your keen to see YouTube on your Pi I suggest tring XBian or Raspbmc.

Friday, 31 August 2012

Eben talks about Raspberry Pi at PopTech

This video appeared on the www.raspberrypi.org blog. It explains a lot about the inspiration and history of the Raspberry Pi

Eben Upton: Raspberry Pi from PopTech on Vimeo.

This is the original Blog entry

Break out cable from Adafruit

This looks like an ideal breakout kit if you already have a bread board. Not tried it myself yet. Also available from Amazon in the UK.


Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

Tuesday, 28 August 2012

"CEC" support, control the RPi through your TV's remote.

This article on www.raspberrypi.org has a good intro to CEC. This allows the TV to talk to the RPi via the HDMI cable. There is a video on youtube.

MPG2 and H264 encode.

It looks like MPG2 decode is available for a fee on a per CPU basis. This should allow the RPi to deal with more movie file formats including those used on DVD. It looks like the H264 encode will be enabled in later firmware releases. There is an article on www.raspberrypi.org and the store is at www.raspberrypi.com/mpeg-2-license-key/

Thursday, 23 August 2012

Canon 400D control, downloading, HDR and timelapse

Looked at controling the Canon 400D with the RPi over USB. gphoto2 seamed a good start, this was available through apt-get on the raspian distro I am using, information from www.gphoto.org. Also looked a HDR and tone mapping, also managed to download pfstools through apt-get , information from pfstools.sourceforge.net. Also looked at enfuse available through apt-get and information from enblend.sourceforge.net

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/,/\//'`
resetusb /dev/bus/usb/${dev}

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
--set-config-index /main/capturesettings/exposurecompensation=0
--set-config-index /main/capturesettings/exposurecompensation=6
--set-config-index /main/capturesettings/exposurecompensation=12
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.

Sunday, 5 August 2012

poundWorld - bluetooth, USB power and HDMI

If I had a pound every time I bought something from a pound shop I would have, well, nothing?

At poundworld I bought bluetooth adapters. Not tried these yet, the one I used on RPi was on old one.
Also bought some "Blackberry" usb charger cables that, in theory, would power a RPi, ok, I've not needed them so far ether, so I don't know how good they are, but you can never have too many USB cables, right?

HDMI

PoundWorld 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.

xbian.org - xbmc for Raspberry Pi

xbian.org looks interesting. Its a xbmc targeted image based on the faster raspian distro of debian. Not given it a spin yet. Looks like an alternative to raspbmc

Bluedevil, bluetooth and PS3 mini keyboard

So, I gave in in the end and installed bluedevil. (sumut like sudo apt-get install bluedevil) It was 200MBs of valuable SD card space but it did the job.
I downloaded the instruction manual for my Sony PS3 mini keyboard. The device did allows for pairing with devices other than a PS3. I paired it with an iPad for practice. So I then tried with the RPi using bluedevil and it worked!. The keypad has a built in mouse too, its a little strange to use but kind of works. Was a little too fast. To make the keyboard go into pairing mode you have to hold the blue button and turn it on. Keep holding the button until two lights on the keyboard flash alternately. (as in the instructions)Then in bluedevil I set up a manual key 1234 and tried to pair with the keyboard. When it tries to pair type the key into the PS3 keyboard and press return. On the keyboard press the finder button to enter mouse mode and then move you fingers over the keys like a track pad. The left and right cursor buttons act as mouse buttons in this mode. I would not recommend it as a major keyboard but it may be useful for administering a system where its not convenient to have a full size keyboard. Also if you use bluetooth for some other peripherals you can attach a simple keyboard without using up an additional USB port.

Wednesday, 1 August 2012

The Bluez

To start looking at bluetooth I installed sudo apt-get install bluez This work with a cheap butooth dongle I had. I did not work out which chip set it was. I could see my iPone on the Raspberry Pi and the Raspberry Pi on my iPhone. Did not do much more than this. I did everything using the command line. There is some good reference on http://wiki.debian.org/BluetoothUser. However most GUI installs seamed very large so ended up NOT installing blootooth or bluedevil I just installed bluez. To check what will install, apt-get has a simulation mode using -s. It does not tell you the size of files but it lets you know if stuff exists and you get some idea of how much it depends on. eq sudo apt-get install bluez -s. Note that I have not actually paired anything yet. I will keep you posted.

Tuesday, 24 July 2012

Thursday, 19 July 2012

View from the window. (Desktop sharing to Mac)

I have already installed stuff on the RPi Raspian using sudo apt-get install netatalk based on instructions on http://www.sanityinc.com/articles/mac-screen-sharing-with-linux i copied on existing config file to /etc/avahi/services/rfb.service and edited it. As in a previous post I had vac server set up using "sudo apt-get install vncserver" (May be vnc-server ?). In finder on a Mac I can see the RPi, click on it and then press the screen sharing button. This uses the vnc client in OSX. This client was a bit better than the vac client I downloaded for the mac as it supports later OSX style full screen with multi finger swipe between desktops.

Share and share alike (Sharing RPI files to a Mac)

Setup file sharing on my RPi so files were visible on my Mac. (RPi image 2012-07-15-wheezy-raspbian.zip). Basically followed the instructions on http://gettingstartedwithraspberrypi.tumblr.com/post/24398167109/file-sharing-with-afp-and-auto-discovery-with-bonjour I did the sudo apt-get install netatalk. This appeared to install the avahi-demon and also set it up to run on boot. It also added the config file /etc/avahi/services/afpd.service. So the single install did it all. Remember to log on as your RPi user and password. I had to click the "connect as" button in finder. I could see files. Not done any transfers yet. Will also try on the previous debian wheezy beta image.

Gone native (New Raspian image, debian wheezy on steroids)

A new image is available from the raspian guys. It's a Debian wheezy release targeted for the RPi hardware. I think old wheezy beta was built for arm 4 achitecture. This raspian distro is build for arm 6 architecture and is target for the RPi chip. It is a lot faster. With previous releases the CPU usage would peak frequently and the Pi would run slow. This occurs less often now during usual use of the X desktop. I recommend an upgrade.

Wednesday, 11 July 2012

Java

Installing java using sudo get-apt install openjdk-6-jre. I will let you know if this was a mistake. (Edit: This seamed a good idea after all. Ran javadrone app. It was slow but worked. May return to java again, I try to keep you posted.)

Lots of Bull (Raspbmc media centre and Redbull TV)

Installed raspbmc by following the linux instructions using the RPi. I added a new SD card on USB and very carefully installed raspbmc to it. Installation was very easy to do. I have installed lots of plugins. Not get GeekBeat to play yet but RedBull TV, 500px, TED have all works. Also played movies from my "My Book Live" disk using its built in twonkey server. Conneted RPi to WD's twonky using upnp.

Monday, 9 July 2012

Magic lamp (Geany IDE, omxplayer)

It looked like wheezy does not have as much clutter. geany was missing but I installed this using apt-get. Its a very light wieght IDE which was usefull for C code development using a make file. omxplayer is intalled and working. omxplayer --adev hdmi gives me audio to the HDMI.

Saturday, 7 July 2012

Climbing a mounting (Debian wheezy mounting a net disk)

So pynieghborhood has let me down. However to command line mount.cifs //192.168.100.3/Public /mnt/Public appears to work OK as su. Managed to copy across some files. To add a password to su use sudo passwd.

Install tightvncserver and vlc

I found this about installing tightvncserver and vlc. tightvncserver is demoed on youtube http://www.youtube.com/watch?v=c5QCoh8S0N4&feature=youtu.be.
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.

Update and upgrade

Wheezy boot fine. There is a new config stage, looks a bit like a bios config stage. In theory it has also extended the partition on the second boot. The screen is not full size but I have fixed that before. Ran sudo apt-get update and also sudo apt-get upgrade both took a long time. Also ran fbset which displays the screen setup. It is booting in 16 bit scene mode. To be honest 16 bit mode was pretty good on squeeze, even for video. I may tinker with this later but on squeeze omxplayer did not work in 32bit mode. Having said that I did use the config tool to give me 64MB of graphics memory. This may help with video type stuff.

Class 4 (SD cards, speed and compatibility)

I read up on SD cards from good old Wiki. The class rating is the cards basic speed in Mega bytes per second. Each disk has its class printed on it inside a "C", looks like a copyright symbol but with a number in it. Note there is lots of chat about SD card compatibility with Raspberry Pi. The general advice is it stick to known brands. I don't know if this chatter was mainly about Beta boards, it has died down in more resent posts. There is a compatibility list at http://elinux.org/RPi_VerifiedPeripherals#SD_cards

Stage 7 (installing the debian wheezy beta release)

This morning I will have a go at creating a new wheezy disk. I've downloaded 2012-06-18-wheezy-beta.zip from the Raspberry Pi page http://www.raspberrypi.org/archives/1435.I have a 4GB Kingston class 4 card and will use a MacBook Air following the OSX instructions on page http://elinux.org/RPi_Easy_SD_Card_Setup. Basically good old "dd" the destroy disk command. Slight brown trousers time if I resort the image to the wrong disk. Note: The debian wheezy image is now replaced. At time of writing the Raspian wheezy image image appears on the download page.

Friday, 6 July 2012

Squeezed out (Replacing debian squeeze with debian wheezy beta)

I have run debian squeeze on PiOne for a while now. Its pretty messed up with all the experimental stuff install on it. So its time to go for Wheezy. I have to try and remember what I did. I upgraded firmware, added WiFi, got motion running with a PS3 web cam. I had omxplayer running full screen, 1080p with sound. This was in 16 bit frame buffer mode. I managed to install vnctight (I think thats what it was called) and could use a vnc client to connect to it. Was able to connect across the WiFi to a net disk. This may or may bot have been related to pyneighberhood. I could not get DNLA server running. Probably need to try raspbmc on a separate card for that. It may do airplay too. (If their web page ever reappears.) Installed chromium browser. Also installed the rpi-update, Xchat and Xpdf. OK I think thats a brain dump. Lets flash the card and do it all again.