Wednesday, December 2, 2015

New Partnership with The Maker Zone

Recently, the good people at PiSupp.ly offered the opportunity to write for their maker focused section called The Maker Zone. All 14Squared articles will still be available here, but we will also be creating new content on The Maker Zone. You will be able to see the content a week before it is released here by going to the Maker Zone website. There it also lots of great content from many different authors on their website.

Monday, October 12, 2015

Announcing Raspbian for Education

Here at 14Squared, we are proud to announce a new project called Raspbian for Education. This unofficial flavor of Raspbian is built for education, with many convenient packaged pre-installed. We will be making a series of interactive lessons built in to encourage children's interest in programming. This project is still in development, but we hope to have a first release out sometime in the next 2 months. If you are interested in helping to develop the project, you can get in touch with me here.   

Wednesday, September 9, 2015

Upcoming PaPiRus Review

Recently, our friends at Pi Supply launched a Kickstarter for PaPiRus, a Raspberry Pi E-Ink display. Over here at 14Squared, this sounded awesome, so guess what? We will be writing a review of the PaPiRus! Our review will feature a getting started guide and some projects to get you set up with your very own PaPiRus. The display is currently on backorder but they are sold for $46.00 for the smallest of 3 size options, and $53.00 for the largest. We are very excited for the review, check back in a couple days for the review.

Monday, August 31, 2015

What is 14 Squared?

Hello!
14 Squared is a replacement for Raspberry Pi Bakery. The difference between the two is that while Raspberry Pi Bakery was only about the Raspberry Pi, 14 Squared will be about all things tech. We still plan to write Raspberry Pi tutorials and guides, but we will also write reviews, news, and other projects.

Monday, August 10, 2015

How to Backup Your Pi's SD Card as an Image file

In this tutorial, I will show you how to save your Pi's SD card as a .IMG file. This is useful because it allows you to switch operating systems, easily while saving all your settings and files.

Time: 15 minutes.
Difficulty: Easy.

You Will Need:

  • A Windows computer.
  • An adapter for your Pi's SD card if using a model B+ or 2B.
Steps:
  1. Remove your Pi's SD card.
  2. Insert it into your Windows computer. 
  3. Download and install Win32 Disk Imager HERE.
  4. Remove all USB flash drives and SD cards except the one from your Pi.
  5. Start Win32 Disk Imager and under "Device", select your Pi's SD card.
  6. Select a location for your file under "Image File" and click "Read". WARNING: The .IMG file will be very large. They are usually around 5-7 gigabytes.
  7. This will take a while but once it's finished, you will have a copy of your entire SD card.



Sunday, August 9, 2015

How to Play Videos on your Pi

In this tutorial, we will be using OMXplayer to play videos on the Raspberry Pi.

Time: Less than 5 minutes.
Difficulty: Medium

To do this, we will be using a feature of Raspbian that allows you to play videos from the command line. I use this feature often at trade shows where we need our video to play on a loop.

Steps:
  1. To start, you will need to get a video to play. I have only tested this method with .MP4 videos but it should work fine with most video formats.
  2. Find the file path to your video and save it for later. This is easy to do, just open up the file manager and navigate to your file, then right click it and select "Copy Path(s)".
  3. Open up the terminal and type "sudo nano /home/pi/VideoPlayer.sh".
  4. Insert the following command, "omxplayer -o hdmi (Paste the path to your video here)".
  5. Exit the Nano editor and try running the script. It should play your video.
  6. This method is not intended for playing all your videos, it's best for just playing one.

Thursday, August 6, 2015

A Brief Review of Pidora

Earlier today I decided I would try some operating systems other than Raspbian. The first one I tried is called Pidora. Here is my experience.
The install took about 10 minutes, and configuring everything took about 5 minutes. All the configuration is done through Pidora's wonderful GUI on the first boot. Once you have everything set up, you see this desktop.
From the Applications Menu up top, you can launch all of the applications that come preinstalled with Pidora. To install more, you can use Pidora's "Yum Extender".

The first thing I installed was Firefox, because the default browser is Midori, which, to put it lightly, is horrible.
Pros:
  • Good UI
  • Nice and easy to use
  • Firefox
  • Yum Extender
Cons:
  • Everything seems very slow on my Pi. I hope to try it on a Pi 2. If it is any faster, I might use this instead of Raspbian.

Tuesday, July 7, 2015

Running C# Programs on Your Pi

Have you ever wanted to create something awesome with your Pi, but not wanted to use Python? If so, you are in luck. We will be using Mono and GTK to run C# programs on your Pi.

Difficulty: Advanced
Time: 30 Minutes

You Will Need:

  • A way to access your Pi.
  • A way to transfer files to your Pi.
  • A Windows Computer
Steps:

  1. Log in to your Pi and open the Terminal.
  2. You will need to install GTK and Mono. Use the following commands.
  3. sudo apt-get install mono-complete.
  4. sudo apt-get install gtk-sharp2.
  5. You are done with your Pi for right now.
  6. Now we will install MonoDevelop's Xamarin Studio. It is a C# editor like Visual studio, but it can use GTK, which is what you will need to run GUI programs on the Pi.
  7. To install it, go to their website. You will also need the .NET framework and GTK, which are also available on their website. Website Link Here.
  8. Once that is all set up. Run Xamarin Studio and start a new GTK project.




  1. Now that that's done, you can write a C# program as usual.
  2. Transfer the .exe file to your Pi.
  3. To run it, right click it and click Mono Runtime as the option to open it.
  4. You should see your program.

Monday, June 29, 2015

How To Backup Your Pi

If you use your Pi often, like me, you know that it can be a pain to lose everything by reinstalling Raspbian whenever something breaks. To avoid this you can backup your home folder to save a copy of all of your work.

Time: 5 minutes.
Difficulty: Easy.

You will need:

  • A way to access your Pi.
  • A USB flash drive.
Steps:
  1. Open the command line and type sudo su. You will need to be a superuser to do this. The user Pi is by default.
  2. Type cd /home/
  3. Type tar czf pi_home.tar.gz pi
  4. Type exit to exit the superuser shell.
  5. Now move the file pi_home.tar.gz to your flash drive and you are finished. The file is located in your /home folder.

Wednesday, June 24, 2015

Setting Up Motion to Access a Webcam Over Your Local Network

In this tutorial we will use Motion to access a webcam connected to your Pi. When we are finished, you will be able to see a live stream of a camera on your local network.

Time: About 30 minutes.
Difficulty: Medium

You will need:

  • A way to access your Pi's terminal. SSH, works great because all you need is the command line.
  • A webcam.
  • An internet connection.
Steps:
  1. Log in to your Pi and open the terminal.
  2. type sudo apt-get install motion
  3. sudo nano /etc/motion/motion.conf
  4. This will open a long configuration file.
  5. There are a couple of things you will need to change, but since the .conf file is so long, it can be helpful to use CTRL+W to find things.
  6. You will need to change daemon off to daemon on.
  7. You will also need to change webcam_localhost on to webcam_localhost off. This will make it so any computer on the network can access the stream, not just the Pi.
  8. You will also need to disable control_localhost by changing it from control_localhost on to control_localhost off.
  9. That should be it, just exit the nano editor and restart.
  10. You will need the IP address of your Pi. You can get it by typing hostname -I.
  11. In a browser, type the address and at the end, type :8081. You should see a live stream from your webcam. I have had problems with Google Chrome but Firefox works fine.

Tuesday, June 23, 2015

Blinking your first LED

In this tutorial we will blink an LED using Python.

Time: 10 minutes
Difficulty: Easy

You will need:

  • A Raspberry Pi.
  • A way to access its terminal.
  • A breadboard.
  • A 220 ohm resistor.
  • An LED
  • An Internet connection on your Pi.
  • 2 Jumper Wires
Steps:
  1. If you don't have the GPIO library, you'll need to install it by typing sudo apt-get install python-dev python-rpi.gpio. If you get an error message, try typing sudo apt-get update --fix-missing and try again
  2. Wire up your pi exactly as shown. Be sure to do the wiring with the Pi unplugged.
  3. Type sudo nano /home/pi/Desktop/RPiLED.py
  4. Copy and paste the following code into the nano editor. 
  5. import RPi.GPIO as GPIO  import time    
    def blink(pin):  
            GPIO.output(pin,GPIO.HIGH)  
            time.sleep(1)  
            GPIO.output(pin,GPIO.LOW)  
            time.sleep(1)  
            return  
    GPIO.setmode(GPIO.BOARD)    
    GPIO.setup(11, GPIO.OUT)    
    for i in range(0,50):  
            blink(11)  
    GPIO.cleanup()
  6. Exit the nano editor by pressing CTRL+X, Y, and Enter.
  7. Right now, running RPiLED.py will cause the LED to blink 50 times. You can change how many times the LED blinks by changing the highlighted text above.
  8. Try running your script by typing sudo python RPiLED.py in the terminal.
  9. If it does not work, check your wiring. If you don't see a problem, try using a different LED.
The code for RPiLED came from www.rpiblog.com.


Wednesday, June 17, 2015

Using Your Raspberry Pi to Take Time Lapse Videos

For this project, we will be setting up a webcam on the Raspberry Pi using fswebcam. We will then create a shell script to take a pictures at scheduled intervals. This is a great skill building project so we will do some variations on it in the future. The video below was taken this way.


Time: 20 minutes
Difficulty: Easy

You Will Need:

  • A Raspberry Pi.
  • Some way to access it's terminal. You can use SSH, Remote Desktop, or keyboard and mouse.
  • A USB webcam.
Steps:
  1. Plug in your USB webcam before powering on your Pi.
  2. Power on your Pi and open the terminal.
  3. Type sudo apt-get install fswebcam. This is a simple way to use a webcam with your pi. You can test it by typing fswebcam /home/pi/Desktop/this_is_my_test_picture.jpg. You will see your picture
  4. Type mkdir /home/pi/Desktop/Timelapse
  5. We will now write a bash script to take the pictures.
  6. Type sudo nano /home/pi/Desktop/timelapse.sh
  7. In the nano editor, type DATE=$ (date +"%Y-%m-%d_%H%M")
  8. On the next line type fswebcam /home/pi/Desktop/Timelapse.
  9. Press CTRL+X, then y, and then Enter to exit nano.
  10. Right now all our script does is take a picture. We want it to take lots of pictures at specified intervals. To do this, we will use cron, a way of scheduling tasks to run on the Pi at certain intervals.
  11. To edit your crontab (the place where cron looks to find out which command to run) type crontab -e in the command line. You will see this window.
  12. In the bottom, in a new line, type * * * * * /home/pi/Desktop/timelapse.sh. Save with CTRL+X, Y, and Enter. You should then the message "crontab: installing new crontab"
  13. If everything is set up correctly, you should start to see pictures in your Timelapse folder.
  14. You can use any video editor to turn your stills into a video. According to the Raspberry Pi website, you can use the following commands to convert the pictures on the Pi.
  15. sudo apt-get install mencoder
  16. cd /home/pi/Desktop/Timelapse
  17. ls *.jpg > stills.txt
  18. mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi mf type=jpeg:fps=24 mf://@stills.txt



Using SSH to Access Your Pi's Terminal Remotely

In this tutorial I will show you how to use SSH and PuTTY to access your Pi's command line from a Windows computer.

Time: 5 minutes
Difficulty: Easy

You Will Need:

  • A Raspberry Pi running Raspbian.
  • A keyboard and mouse. You can also use Remote Desktop.
  • A Windows computer.
Steps:
  1. Log in to Raspbian and open the terminal.
  2. Type sudo raspi-config and press Enter.
  3. Use the arrow keys to navigate to "Advanced Options".
  4. Use the arrow keys to navigate to "SSH"
  5. Navigate to the "Enable" button and press Enter.
  6. You will see a screen saying that SSH is enabled. Hit "OK".
  7. Navigate to the "Finish" button and press Enter.
  8. You will be prompted to restart your Pi. Hit the "Yes" button.
  9. You are done with setup on the Pi. Now we will install PuTTY on your Windows machine from the PuTTY website.
  10. Go to the link in step 9 and install PuTTY.
  11. When you open PuTTY you chould see something like this.
  12. Enter in your Pi's IP address in the box labeled "Hostname (or IP address)"
  13. Set your "Connection type" to SSH
  14. Click "Open" (You can save your setup for later by clicking save)
  15. You will have to log in to your Pi with your username and password.

  16. You should now see the command line of your Pi.

Tuesday, June 16, 2015

Host a Wordpress Site on the Raspberry Pi

In this tutorial I will show you how to host a Wordpress website from your Pi.

Time: About an hour.
Difficulty: Medium.

You Will Need:

  • A Raspberry Pi running Raspbian
  • An Internet connection
  • Keyboard, mouse, and monitor. Or you can use remote desktop.
Steps:
  1. Log in to Raspbian and open the terminal.
  2. Type sudo apt-get install apache2 -y and press Enter.
  3. Find the IP address of your Pi with hostname -I.
  4. Write down and save the IP address.
  5. In a web browser, navigate to the IP address.
  6. You should see this.
  7. Type sudo apt-get install php5 libapache2-mod-php5 -y. This will install php.
  8. Type sudo apt-get install mysql-server php5-mysql -y. This will install SQL.
  9. SQL will prompt you to set a password. Remember it, you'll need it later.
  10. Now we will install Wordpress.
  11. Type cd /var/www
  12. Type sudo chown pi: .
  13. Type sudo rm *
  14. Type wget http://wordpress.org/latest.tar.gz
  15. Type tar xzf latest.tar.gz
  16. Type mv wordpress/* .
  17. Type rm -rf wordpress latest.tar.gz
  18. Now let's set up the Wordpress database
  19. Type mysql -uroot -p
  20. You will have to enter the password you set earlier.
  21. Type create database wordpress;
  22. Then use Ctrl-D to exit
  23. Go to the IP address of your Pi and you should see a Wordpress site like this one.
  24. Press the Let's Go! button to fill in the details for the configuration form.
  25. You will now have to enter in the information as follows.

  26. Press submit.
  27. Copy and paste the information from the next screen to wp-config.php and hit Ctrl+X, Y, and Enter.
  28. Click Run the Install.
  29. Fill out the form in the next page and click Install Wordpress.
  30. DONE!
Log in to Wordpress to customize your site!

The code for this project came from the Raspberry Pi Official Website. They have many great tutorials so check them out!

Monday, June 15, 2015

Using Remote Desktop Connection to Access Your Pi.

In this tutorial I will show you how to use XRDP and Remote Desktop Connection to access your Raspberry Pi remotely. This process is very simple and eliminates the need for a keyboard, monitor, and mouse.

Time: less than 5 minutes.
Difficulty: Easy

You Will Need:

  • Raspberry Pi running Raspbian.
  • Keyboard, mouse, and monitor (for setup only).
  • An Internet connection, either Ethernet or wifi.
  • A Windows computer
Steps:
  1. Start your Pi and log in to Raspbian.
  2. Open your terminal.
  3. Type sudo apt-get update and press Enter.
  4. Type sudo apt-get install xrdp and press Enter.
  5. Once this finishes, type hostname -I. This will show the IP address of your Pi. Write it down and save it for the next step.
  6. log in to your windows computer
  7. Open Remote Desktop Connection
  8. Type the IP of your pi in the box labeled Computer.
  9. This should show a log in form for your Pi.
  10. Type in the user name and password for your Pi.
  11. You should see your Pi's desktop or terminal.




The OSMC Media Center Operating System



OSMC is a media center operating system for the raspberry pi. There are many different media center type operating systems for the raspberry pi (Raspbmc and OpenELEC) this one has worked out best for me, and here’s why.


  •  Add-ons. They are easily installed from within the OS and seem to work pretty well.
  • The OSMC skin. OSMC comes preloaded with a beautiful, functional, and easy to use skin.
  • The online remote. It comes preloaded with one but it only really works if you are looking at the screen. I use Chorus, which can be downloaded from within the OSMC operating system.
  • Samba. Samba requires almost no configuration except for turning it on. Once Samba is running you can easily transfer files to and from your Pi.
Let’s talk about the other media center operating systems.

I  tried Raspbmc and was never really able to get it to work. I did not like the interface as it was confusing and did not look very nice. I would not recommend it.
I also tried OpenELEC which was slightly better but still not perfect. It ran and add-ons such as YouTube and Pandora were available. The interface was the same though and it was not as fast as OSMC.

Conclusion.

OSMC is by far the best. It is fast and responsive and the add-ons work. I would highly recommend it as a media center operating system.
 

Friday, June 12, 2015

New Project: Tangram on the Raspberry Pi

Hello,

For my first project I am trying to set up Tangram (a map program) on the raspberry pi B+. So far I have installed Tangram, built it for the Pi, and configured it to read the map tiles locally, instead of just getting them from the Internet. There are, however, a couple of problems. The map tiles are HUGE! An individual tile is not but when you need to download literally thousands of them (more than 4,000 just for Manhattan) it can be easy to eat through all of the space on the Pi. Also, after downloading all the map tiles for Manhattan, and cringing as all of my memory disappeared before my eyes, the map was still very slow and took a long time to update. My goal in the end is to have an on-board screen, (maybe PaPiRus), a GPS module, and a battery.