Monday, May 4, 2015

Guide: Mac Internet Sharing with your Pi

Ok, here goes my second guide...

I myself have one of my Pis connected to my Mac via Ethernet and Internet Sharing (which by the way is surprisingly fast) and can be used without a Internet connection, perfect for working on your Pi on a plane.

1. Open up System Preferences and make sure you're at this page:

2. Select Sharing on the third row and you should come up with a screen like mine, except yours probably doesn't have as many things checked. Select Internet Sharing.
3. Configure your connection from and your outgoing connection (which is going to be Ethernet). Then check it and press Start. (This is not going to be a security threat, since the would-be attacker would need physical access to the Ethernet to get your Internet, just so you know).

4. Now you can connect your Pi with any regular Ethernet cable. If you have a laptop, your going to need a Thunderbolt or USB connector to get Ethernet out. Your pi should already get an IP address through DHCP.

5. Now, open the Terminal and type in arp -a which will come back with a load of IP addresses. Find the ones that are different and only have a few entries. I came back with this:
The ones I'm interested in are the ones with 192.168.2.X. Yours might be different, but it should only have three addresses (in my case 192.168.2.1 which is my Mac, 192.168.2.2 which is my Pi, and 192.168.2.255 which is the mask). Your Pi won't be .255 or .1 so choose the one which makes the most sense. I choose 192.168.2.2. When in doubt, you can always try different ones.

6. Now type ssh pi@192.168.2.2 where 192.168.2.2 is your IP address that you just found. Now you have successfully connected to the Raspberry Pi console.

You can ask questions in the comments! Thanks for reading!




Guide: Playing Spotify on Raspberry Pi 2 Without Premium

Ok, I'm going to write my first guide, so bear with me if it has any errors. You're welcome to spot them out in the comments.

So I've wanted to play Spotify on my raspberry pi to make it into a streaming client. But for this, you need a premium account. So I found a workaround for playing Spotify on the raspberry pi 2 without premium.


  1. I'm using the Ubuntu community image since it has the latest packages which I like, although this should work on plain raspbian as well. Ubuntu download.
  2. Now what I'm going to use is the Spotify Web player, since to use or make an unofficial client would mean having premium. So make sure you have a Spotify account and a raspberry pi and get it all set up. A guide will be written on how to do that. 
  3. Install chromium. This isn't the fastest browser, but through a hack it does have support for Flash which Spotify uses. sudo apt-get install chromium -y  
  4. Now I'm going to copy the instructions posted by gkreidl at the Raspberry Pi Forums (Link) Put this into the Terminal:
    wget http://odroidxu.leeharris.me.uk/PepperFlash-12.0.0.77-armv7h.tar.gz tar -xzf PepperFlash-12.0.0.77-armv7h.tar.gz
    cd PepperFlash
    chmod +x *
    sudo cp * /usr/lib/chromium/plugins
    sudo nano /etc/chromium/default
  5. Now uncomment the line starting with "CHROMIUM_FLAGS=" Add the following line: CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so --ppapi-flash-version=12.0.0.77 -password-store=detect -user-data-dir"
    Save (CTRL+X, Y, ENTER)
  6. Open up chromium and go to chrome://plugins. Find pepperflash and enable it. Now you have flash.
  7. Now go to the Spotify web player (Link) and it should work. The UI is very slow, but its the only way I could find that doesn't require premium. Playback hardly has any stutters on my tests though.
I hope you enjoyed this!

Sunday, May 3, 2015

Learning C++...

So I'm currently learning C++ through a book that came with very high reviews called C++ Primer. 1,000 pages... I got it from Kindle, but the formatting only shows up right when I use the Cloud reader and it is very good. Very thorough, though I'm only on Chapter 2. I've made a GitHub repo to store the examples that I've typed and am starting to like it. In the end, I would like to learn Qt4 (I've already got the build environment ready which I may make a guide on) to start making GUI programs. Slowly going along...

Welcome!

Welcome! Here I'll journal my experiences and post guides. I'll start posting soon, so stay tuned!