Showing posts with label RPi. Show all posts
Showing posts with label RPi. Show all posts

Friday, 4 October 2013

Internet and Raspberry Pi enabled model railway @ kevingordon.org.uk

I have been busy writing up my Raspberry Pi project, which is an internet and Raspberry Pi enabled model railway, see it here at http://www.kevingordon.org.uk/articles/raspberry-pi-railway-web-controlled.html In this article you will find the follow;


  • The process I went through to create the project
  • The source material
  • The architecture diagrams of the design as it developed
  • The source code, both for the Raspberry Pi (python) and server-side (PHP)
  • Videos of the railway working at different stages/progress of the project
  • Other relevant images
  • The XpressNet API guide for download
I hope you enjoy, would love to hear if you use this to base your own project off of!

Sunday, 22 September 2013

Cloning a Raspberry Pi SD card on a Mac

This really is actually quite simple;

1. Enter source SD card into Mac (make sure you have set it to locked before hand)
2. At the terminal type "df -h", the output will list the inserted disk as something like;

/dev/disk1s1    69Mi  9.1Mi   60Mi    14%        0        0  100%   /Volumes/Untitled
3. Now take a backup of the disk by typing the following;
sudo dd if=/dev/rdisk1 of=/Users/kevingordon/Dropbox/kevscode/RPi-backup/raspbmc-backup.img

Where rdisk1 - the 1 is from the /dev/disk1s1 above. And the of will be the path with the image filename on your hard drive where you want to put the disk image.

4. It will ask your password, and then will take 1/2 hour or so to process. Note you can monitor the activity by opening System monitor and searching for the "dd" process - you will see that it is active. Once it is finished it will return some information like the following;

7744512+0 records in
7744512+0 records out
3965190144 bytes transferred in 4078.160970 secs (972299 bytes/sec)

5. Now eject the disk as normal.
6. Now copy this to the new disk, make sure the disk is unlocked, and enter the SD card
7. In disk utility, unmount the disk, an it should be replaced with something like disk1s1, and disappear from your desktop.
8. At the terminal type the following; 

sudo dd if=/Users/kevingordon/Dropbox/kevscode/RPi-backup/raspbmc-backup.img of=/dev/rdisk1 bs=1m

This may or may not ask for your password. Note the if directory is the location where you put the image file above. Then the of will be the same as the if that you used previously - confirm this information using df -h again.
9. Once the command above is running, it will take 1/2 hour or so, and you can monitor using the System Monitor and searching for the dd process.
10. Once complete it will give you the following (something like);

3781+1 records in
3781+1 records out
3965190144 bytes transferred in 792.939957 secs (5000618 bytes/sec)

11. Eject the disk using disk utility.
12. That's it! - You can now use this in your Raspberry Pi - a fresh clone of whatever you were running previously, awesome!

Monday, 7 January 2013

Setting your Raspberry Pi up as a Media Server

So I've given up on getting BSP running on my RPi at the moment and instead I went about setting up my Raspberry Pi as a media server. And I've installed Raspbmc based on the xbmc (xbox media center) and it is friggin' awesome. All my videos stream - at a better quality than my PS3 media server and with very little buffering or lag. Not only that but it's got iPlayer too (after a bit of effort). I go through and explain how to get Raspbmc up and running, how to connect a network hard drive with your media, and how to get iPlayer up and running.
  1. Download the Raspbmc installer for your Mac here http://www.raspbmc.com/download/ Follow the instructions here http://www.raspbmc.com/wiki/user/os-x-linux-installation/ to install it on a SD Card - note that you need an SD Card dedicated to running your Raspbmc.
  2. Once you've downloaded the installer and run it, it will put the appropriate content on your SD Card, say no to installed to a usb jump drive.
  3. Now you are ready to put it in your RPi
  4. So put it in your RPi and boot it up, it usually takes 20 minutes plus to go through the whole installation routine, but it should go through without any issues - make a coffee - and then reboot a few times. I got a couple of warnings / error messages, but it all went through fine
  5. Then it'll be up and running.
Linking to your media
  1. To do this go under video, and go to files.
  2. Go to "Add Videos"
  3. When the Add videos dialog appears, go to "browse"
  4. For me it involved selecting the "Windows network (SMB)" then choose MSHOME, choose the computer, disk and sub-folder
  5. Choose a name for it (type it in), and choose okay
  6. Choose that the directory contains Movies - to choose the movie scraper
  7. Turn on "Movies are in separate folders that match the movie title" and "Scan recursively"
  8. Choose okay
  9. Choose "Do you want to refresh info for all items within this path" say yes
  10. Let in scan the folders
  11. Now go home
  12. Now to play movies go within Videos and files and choose the movie of your choice.
Installing iPlayer.
  1. Download the iPlayer plugin here; http://code.google.com/p/xbmc-iplayerv2/downloads/list
  2. Place the zip on your media server / hard drive where you are getting the content.
  3. Go to System Settings, then Add-ons, then choose "install from zip file"
  4. Then navigate to the file, and choose for it to install
  5. Once installed you've find it under Videos, then add ons



Saturday, 5 January 2013

RPi BSP status update

I failed to get BSP to install on my MacBook Pro, there were two many make errors that I could not resolve.

However I tried running and installing the software on a raspberry Pi and it seemed to work fine. I chose single core, Linux, UDPIP, and everything looked fine, until I tried to compile a simple programme. When compiling a simple programme I get the following error;

/usr/bin/ld: cannot find -lbspcore_00
/usr/bin/ld: cannot find -lbspudpip
/usr/bin/ld: cannot find -lcpr

So it is basically failing to link some libraries that it can't find. I think when I did the initial make there were some errors - so perhaps these libraries failed to be created. Also it maybe something to do with choosing the UDPIP setting, so I could try installing BSP on another RPi and choose TCPIP. In fact initially I should choose the generic standalone one.

Running BSP on RPis (Raspberry Pi's)

For my university dissertation I did an experimental investigation into parallel computing using the BSP (Bulk Synchronous Processing) paradigm. You can download it here; www.kevingordon.org.uk/projects/bsp/experimental-parlallel-computing-final-report.pdf.

So this is my new project to get BSP running on a Raspberry Pi, what I'm going to attempt to do is the follows;

1. Install BSP on 3 RPi (Raspberry Pi) nodes
2. Get the BSP daemon to communicate between the 3 nodes using the test profiling software
3. Get the parallel algorithms I wrote as part of the dissertation running on the 3 node RPi cluster.
4. Write some more interesting parallel algorithms to run on the 3 node cluster
5. Buy addition RPi's perhaps get a 10 node cluster running
6. Profile the RPi cluster
7. Get the BSP running on OS X
8. Profile BSP running on a single multicore OS X node
9. Compare the 1 node (multi-core) OS X computer to the 10 node RPi cluster
10. Based on the resulting performance perhaps get additional RPi nodes to add to the cluster

So thats the plan, watch this blog and I will post the results.