Monday, 28 January 2013

Getting Started with Raspberry Pi

I have had a Raspberry Pi single board computer in a box in the attic for a few months - I had forgotten that I had pre-ordered it, and was busy with the Arduino solar panel power meter when it arrived, so didn't do anything with it.

Well, I know that the wheelchair project will need some brackets to mount motors, lights, GPS receiver etc., and have been reading about 3d printing, and thought it would be a handy excuse err... a necessary part of the project, to try out 3d printing for these parts.   And the 3d printer will need a little print server, so I don't tie up my laptop when it is printing.   So, I am dusting off the Raspberry Pi and having a go at setting it up to see if it will be able to do that.

These are my notes, so that I can do it again if I accidentally break it...

Basic Set-Up

  • Download the Debian root filesystem image from the Raspberry Pi web site.
  • Unzip the archive to give us 2012-12-16-wheezy-raspbian.img.
  • Copy it to a 4GB SD card using dd if=2012-12-16-wheezy-raspbian.img of=/dev/sdb.  (Note, write to whole SD card, not to a partition - sdb, not sdb1).
  • Put SD card into raspberry pi, connect HDMI to TV in living room and switch on.
  • Success - boot messages displayed on TV
  • Failure - it lands in an interactive set-up utility, and I don't have a keyboard for it - doh....maybe I should have gone for openWRT.
  • Try different approach - forget the TV now I know it boots, and just connect it up to the network.  It gets is IP address from my router, and I can now ssh into it, with username pi, password raspberry.
  • Now I can run sudo rasppi-config, which is the same config utility that came up on the TV monitor.  Used this to expand root filesystem to fill SD card, but didn't see much point in changing anything else (will sort out a user in a minute and do away with the pi user).

3d Printing Stuff

  • Followed instructions at https://github.com/w-A-L-L-e/printerface, with the following exceptions:
  • mv kliment-Printrun-71e5da0/ printrun
  • Node-js needed sudo apt-get install nodejs not node-js.
  • Had to do sudo ln -s /usr/bin/nodejs /usr/bin/node to get npm install.sh to work.
  • needed to  curl https://npmjs.org/install.sh | sudo sh. to avoid directory access errors.
  • The forever@0.9.2 failed to install with lots of errors, but npm install -g forever worked.
  • But starting printerface using forever failed with an error on line 404 (monitor.send).
  • node printerface.js works though - web interface appears on port 8080.
Will update when I get further....

Post a Comment