Wednesday, 18 June 2014 23:34

Removing Applications from Raspberry Pi

You might want to remove some applications to free up some space on SD card. Use the following syntax to uninstall a program
sudo apt-get –purge remove APPNAME #replace APPNAME with the name of the app you want to remove
An example to remove Scratch program 
sudo apt-get remove scratch
Published in Tutorials
Tuesday, 10 June 2014 14:52

Raspberry Pi Digital Signage

Raspberry Pi (Model B) is a single-board computer that uses an ARM 11 (ARM1176JZF-S core) processor running at 700MHz (it can overclock up to 1GHz) with 512MB RAM.
 
This article shows you how to turn your Raspberry Pi into a cheap, browser based digital signage solution. It covers setting up a mini webserver on using the lighttpd+PHP web server and also how to start a web browser without a desktop environment.
 
I will use Midori as the web browser since it is a default browser that is found in Raspbian (a free operating system based on Debian optimized for the Raspberry Pi).
Published in Projects
Edit the crontab file
sudo su - #switch to supuer user
crontab -e #edit crontab file

Put this line at the end of the file. This will turn off display at 5.30PM and turn on display at 8.30AM

30 17 * * * tvservice -o

30 8 * * * tvservice -p; fbset -depth 8; fbset -depth 16

 
Crontab syntax:
*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0-6) (Sunday=0)
|     |     |   +------- month (1-12)
|     |     +--------- day of month (1-31)
|     +----------- hour (0-23)
+------------- minute (0-59)
Published in Tutorials
Wednesday, 21 May 2014 12:46

Raspberry Pi Schedule Reboot

Edit the crontab file
sudo su - #switch to supuer user
crontab -e #edit crontab file

Put this line at the end of the file. This will reboot the Raspberry Pi at 1.30PM every day.
30 13 * * * sudo reboot
 
Crontab syntax:
*     *     *   *    *        command to be executed
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- day of week (0-6) (Sunday=0)
|     |     |   +------- month (1-12)
|     |     +--------- day of month (1-31)
|     +----------- hour (0-23)
+------------- minute (0-59)
Published in Tutorials
Example Configuration
  • Raspberry IP: 192.168.0.123
  • Router IP (Gateway): 192.168.0.254
  • Subnet Mask: 255.255.255.0
  
List the network interface we currently have available:
cat /etc/network/interfaces
The output should look like this:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
The line iface eth0 inet dhcp shows that it is currently getting out IP address via DHCP. We need to change this line to iface eth0 inet static.

Edit /etc/network/interfaces
sudo nano /etc/network/interfaces
Change  iface eth0 inet dhcp to iface eth0 inet static and add the following settings just below it:
address 192.168.0.123
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254
Here is an example:

auto lo

iface lo inet loopback
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

Finally, reboot the Raspberry Pi.
 
 
Fixing DNS problems
DNS is the service that converts the website URL, i.e. www.goggle.com into the IP address (173.194.126.36) that is needed for actual communication. 
 
Check your DNS entrie
cat /etc/resolv.conf
 
Here is an example of the output
nameserver 192.168.0.254
The nameserver should same as your gateway (your modem IP). If the nameserver and the gateway is different, you should modify the /etc/resolv.conf file and change the nameserver to your gateway IP.
sudo nano  /etc/resolv.conf
 
 
Published in Tutorials
View the current display configuration
tvservice -s
 
View the /boot/config.txt settings
vcgencmd get_config int
 
Get the list of what is supported by your monitor:
tvservice -d dataFile #dump information to dataFile
edidparser dataFile #load dataFile & display on screen
Published in Tutorials

Midori is a lightweight browser using the WebKit rendering engine and it is a default browser that is found in Raspbian. This is a quick quide to start the Midori browser from the command line without a desktop manager.

 
To start the Midori in full screen mode, use the following command:
xinit /usr/bin/midori -e Fullscreen -a http://domain/homepage.html
 
However it is not in full screen mode, it just fill up about quarter size of the screen. To fix this problem, Midori must run on a windows manager. Here is the solution:
Published in Blog
Sunday, 04 May 2014 20:43

Setup a Raspberry Pi PHP web server

Lighttpd is a lightweight web server, with all the essential functions of a web server, PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. This is a quide on how to install Lighttpd and PHP on a Raspberry Pi.
 
Prerequisite
Published in Blog
Monday, 11 February 2013 10:39

Resizing SD card partitions for Raspberry Pi

If you download the Raspbian image from Raspberry Pi official homepage and write it to the SD card, the SD card partition is fixed to 2GB, meaning that only 2GB is accessible no matter how big your SD card are. You must manually re-size the SD card partition in order to increase the available storage capacity.

Published in Blog
Sunday, 03 February 2013 18:35

Backing Up Raspberry Pi SD card

  • Insert SD card to computer
  • Launch Win32 Disk Imager
  • Select Device (source) which you want to backup from
  • Under Image File, give it a file name as shown in figure below
Backup Raspberry Pi SD card
 
  • Click Read button to start backing up
  • As shown in figure below, the image file size is equivalent to the size of SD card since I had resized the partition of my SD card
After Backup
Published in Tutorials
Page 1 of 2
Back to Top