Although I prefer other languages, here´s a small tutorial to get you started with Python on your Raspberry Pi. The latest Rasbpian distribution already comes with Python so you don´t even need to install anything else. Actually, i even found 2 versions on my Raspberry, 2.7.3 when i just run “python” in the terminal and 3.2.3 with “python3”. Obviously, we will use python3 here.
Before getting serious with a headless Raspberry, it´s a good idea to set up a folder to be uses as network share in Windows. That is, if you are a Windows user. If you are a Linux user, i expect that you know how to reach your Raspberry. In that case, you would not even read my N00b posts, i guess 😉
So you already know how to connect to the LAN, but sometimes the Router is not right next to the Raspberry Pi and you need a wireless connection. Not every WLAN stick is compatible, check the compatibility list before you buy one. I am using a TP-LINK 150Mbps Nano, no additional driver needed and you almost don´t see it when it´s in the Rasbperry. With “ifconfig“, you can see if the WLAN stick is up and running with the correct driver:
Every now and then, it is a good idea to update the Firmware of your Raspberry Pi. There is a very nice tool out there to make that easy for you: https://github.com/Hexxeh/rpi-update
It is quite easy to install the tool, first you have to install GIT:
sudo apt-get install git-core
After installing a Linux distribution as explained in my article “Raspberry Pi for n00bs – Installation“, it is time to change some basic settings. This article covers everything you need to know to get your system ready to use. I only run my Raspberries “headless”, without a monitor/TV. Saves an expensive gold-plated HDMI cable and all the cool kids do it 🙂
A complete PC for only 30 Euros, super-silent without active cooling, the operating system on SD card. That is the Raspberry Pi 🙂
- Raspberry Pi – B/B+ (30-35 Euros)
- Ethernet cable (1-2 Euros)
- Power supply with at least 0,7A (better 1A) and Micro USB (5-10 Euros)
- One of the countless Raspberry cases (5-10 Euros)
- SD card with at least 4GB, better 8 or 16 (10-20 Euros)
Now we´re already at ~50 Euros, but the Mini-PC only needs 2-3 Watts and practically no space.
A HDMI cable and a USB keyboard are optional, for the first installation and if you don´t just want to administrate the Raspberry Pi with SSH. Check your local supplier for all the items, SD cards are pretty cheap at Amazon. It´s a good idea to check the compatibility list first: http://elinux.org/RPi_SD_cards
I´ve already explained how to use “Heroku” in my Article “Heroku – Gratis SSL für Facebook Apps“, but Heroku offers a lot more with the Add-Ons. For example, “PostgreSQL” for – surprise, surprise – PostgreSQL databases. A wonderful alternative to MySQL, to store User data in a Facebook App (for example). Here´s a mini-tutorial:
Searching for a Backup-Solution? “Robocopy” is all you need, at least if you are a Windows User. Since Windows Vista it´s already included and there is even a GUI (Graphical User Interface) called “Robocopy GUI“. For the daily/weekly Backup it´s easier to create a Batch file that you can call from the Desktop whenever you feel like it.
A NAS is not only good for storing data and media, you can also use consumer-webcams per USB. And that´s all you need for video monitoring with motion detection. The tutorial is based on the QNAP TS-212 (the best there is), but it should be the same for all QNAP devices. In fact, it should work on pretty much every linux distribution.