
Raspberry Pi is an awesome little single board computer for around $35. Adafruit is a one-stop-shop diy electronics supplier. Adafruit rolled it’s own Linux distro to run the Raspberry Pi, called Occidentalis, and has recently alpha released the Raspberry Pi WebIDE that allows you to program your Pi with Chrome or Firefox on your Mac or PC.
The documentation to get things rolling is a bit spread out, so here are steps that Mac users need to use to run Occidentalis with the WebIDE on your Raspberry Pi.
What you’ll need:
- 1 x Raspberry Pi
- 1 x >=4Gb SD or Micro SD Card and card reader
- 1 x Ethernet Cable
- 1 x 5v powersource for your Pi
- basic comfort with navigating Terminal and SSH
Get things rolling:
- Download Occidentalis by clicking here
- Unzip the file
- Fire up Terminal
- Type
df -hinto Terminal to list the mounted drives on your Mac - Connect the SD card to your Mac.
- Use the
df -hcommand in Terminal again. Note the new listing, something like/dev/disk3s1This is your SD card! - In Terminal type
sudo diskutil unmount /dev/disk{disk #}s1. This unmounts the SD card. - Please be extremely careful with this step! In Terminal type the following command:
sudo dd bs=1m if=~/{path to the .img file}/Occidentalis_v02.img of=/dev/rdisk{disk #}Let’s review a bit of this because it is extra important.
- {path to the .img file} = Desktop or Downloads or wherever you unzipped the Occidentalis file
- rdisk{disk #} = the disk name you noted before with “r” prepended and “s1″ omitted. e.g.
/dev/disk3s1=/dev/rdisk3 - check this command 3 times for errors before you hit return. If you reference the wrong disk, that disk will be erased, including your primary hard drive!
- Hit return and let the file copy. This will take at least a few minutes.
- When Terminal displays
2600000000 bytes transferred in 449.441242 secs (5784961 bytes/sec)(or similar), eject your SD card. - You’re now ready to fire up your Raspberry Pi!
- Plug the Ethernet cable into your Pi and the other end into your router. The Pi and your Mac need to be on the same network!
- Insert the SD card into your Raspberry Pi
- Plug in your 5v power source
- In Terminal type
ssh pi@raspberrypi.local(your SSH password is “raspberry”) - Boom. You’re in.
- Again in Terminal type
sudo raspi-configto change your SSH password - After your password is changed, it’s time to install Adafruit’s Raspberry Pi WebIDE
- Type
curl https://raw.github.com/adafruit/Adafruit-WebIDE/release/scripts/install.sh | shinto Terminal and hit return. - Make a cup of coffee, cause this is going to take a while.
- When the installation is complete Terminal will display:
**** Starting the server...(please wait) ****
**** The Adafruit WebIDE is installed and running! ****
**** Commands: service adafruit-webide.sh {start,stop,restart} ****
**** Navigate to http://raspberrypi.local:3000 to use the WebIDE - You’re done! Open http://raspberrypi.local:3000 in Chrome or Firefox and set-up your WebIDE.
I hope this tutorial put you on the right track. The steps for this tutorial were cobbled together from the following sources:
→ http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-2
→ http://elinux.org/RPi_Easy_SD_Card_Setup
→ http://learn.adafruit.com/webide/installation
Best of luck with your Raspberry Pi projects.
Pingback: How Mac Users can set-up a Raspberry Pi, the Adafruit way #piday #raspberrypi @Raspberry_Pi « adafruit industries blog