Speed tests of SD cards on Raspberry Pi

Here are some speed results of speed of two sd cards on two different Raspberry Pis (old 256MB and new 512MB one). I followed methodology listed on http://elinux.org/RPi_SD_cards:

Write speed
sync; time dd if=/dev/zero of=~/test.tmp bs=500K count=1024; time sync
Read speed
dd if=~/test.tmp of=/dev/null bs=500K count=1024

And here are the results:

SanDisk Extreme class 10 UHS-1 45MB/s
New Raspberry Pi:
 write: 524288000 bytes (524 MB) copied, 27.2083 s, 19.3 MB/s
 read: 524288000 bytes (524 MB) copied, 22.5482 s, 23.3 MB/s
Old Raspberry Pi:
 write: 524288000 bytes (524 MB) copied, 28.5079 s, 18.4 MB/s
 read: 524288000 bytes (524 MB) copied, 22.6449 s, 23.2 MB/s
Centon class 4 (cheap card from Walmart)
New Raspberry Pi:
 write: 524288000 bytes (524 MB) copied, 112.908 s, 4.6 MB/s
 read: 524288000 bytes (524 MB) copied, 30.2082 s, 17.4 MB/s
Old Raspberry Pi:
 write: 524288000 bytes (524 MB) copied, 106.991 s, 4.9 MB/s
 read: 524288000 bytes (524 MB) copied, 27.7869 s, 18.9 MB/s

Result: spend five dollars/pounds more and buy a proper card.

Share

Playing DVD on Raspberry Pi

I’m using Raspberry Pi as a media center using raspmbc, which is amazing for streaming (bbc iplayer, 4od) and playing files from NAS and USB. For DVDs I still needed to connect my laptop to TV, which is just an unnecessary effort. Being geek I knew I have to enable RPi to play my DVDs.

First thing I discovered about RPi as DVD is that it let’s you skip all anti-piracy warnings!:
original

People say it will also ignore region protection (quite useful for my collection of dvds I bought in US)!

So what did I need?
* External DVD (I have actually bought a blu-ray external drive from ebay for 15.89GBP + 2.99P&P, which will work with my macbook air as well).
* Powered USB hub. Raspberry Pi won’t provide the drive with enough power. I’m actually connecting the DVD directly to RPi and using the hub to supply power only. It seems RPi can be powered from the same hub via normal USB connection, which eliminates a need for second power supply.
* A bit of the software:
** MPEG2 Licence – 2.4GBP from rasberrypi.org
** DVD plugin for XMBC (OOTB support doesn’t work good enough yet): http://forum.xbmc.org/showthread.php?tid=158896

Et voila!

ps. when you buy stuff from ebay please check if the seller is paying taxes in your country (eg. is company registered in your country). If not, find another one even if you cost you a pound more. Thanks!

Share

Raspberry Pi, servo motor, gpio, i2c and soldering weekend

This weekend I decided to work on my soldering skills and finally assemble the PWM driver PCA9685 I bought from Adafruit couple weeks back. Not all solder points looks perfect, but I’ve manage not to burn the PCB which I consider a major success. I thank all the
guys how put soldering tutorials on the youtube!

DSCN1556

Then I played with software.
* I2C: I used python to steer servo controller via I2C interface. For some reason the Raspbian image has I2C kernel module disabled, so I had to comment blacklist i2c-bcm2708 in /etc/modprobe.d/raspi-blacklist.conf and the add i2c-dev and i2c-bcm2708 to /etc/modprobe to enable them to start.
* GPIO: Raspbian has all libraries loaded by default for GPIO development in python. I had encountered hardware problem instead – there’re many sources on the web describing pin layout of GPIO port, but non of them says which pin is the physical pin 1! I have some gaps in basic knowledge, so I have missed a small rectangle marking P1 – it’s the one nearest to the side of the board in bottom row. See a picture with pins P3, P5, P9, P10 and P11 connected:
DSCN1563

And here it is – Raspberry Pi waving The Flag of the United States of America

Share

MGPlayer on Raspberry PI (javafx!)

I’ve just “successfully” run my MG Podcast Player on Raspberry Pi using just released JDK8 for ARM Preview.

Performance isn’t great compared to desktop system and it doesn’t actually play mp3 files (Media are not supported yet), but having ability to run a java 8 application on $35 is amazing by itself!

If you want to try follow the steps on oracle site to install the image and then run:
$ /opt/jdk1.8.0/bin/java -Djavafx.platform=eglfb -jar MGPlayer.jar

Notes:
* -Djavafx.platform is crucial as it let javafx work on OpenGL ES 2.0 embedded device
* I’ve installed java on my raspbmc image

Share