Category Archives: Raspberry Pi

using usb storage on raspberry pi

http://www.clarenceho.net/blog/articles/2012/07/15/using-usb-storage-on-raspberry-pi Assuming the USB storage is on /dev/sda To mount a USB stick / disk and make it writable for the default login pi /usr/bin/sudo /bin/mount -t vfat -o uid=pi,gid=pi /dev/sda /mnt/usb/ To create a 512M file on the USB storage and use it as swap: # create an empty swapfile /bin/dd if=/dev/zero of=/mnt/usb/swapfile bs=1M count=512 # create a loop device /usr/bin/sudo /sbin/losetup /dev/loop0 /mnt/usb/swapfile # setup swap area /usr/bin/sudo /sbin/mkswap /dev/loop0 # enable the swap /usr/bin/sudo /sbin/swapon /dev/loop0 To remove

How to Build a Raspberry Pi File Server

http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-raspberry-pi-file-server/ So I found yet another cool use for a Raspberry Pi. You can actually use it as a file server, or more accurately a controller for a file server. All you need is your Pi and a nice external drive and you can serve files to anyone on your network. It’s pretty easy, I’ll show you how.   Other Raspberry Pi Stuff Set up a Raspberry Pi Web Server Raspberry Pi Web Server Speed Test How to Overclock Raspberry

Installing the Raspberry Pi Nano Bluetooth Dongle

https://www.modmypi.com/blog/installing-the-raspberry-pi-nano-bluetooth-dongle Installing the Raspberry Pi Nano Bluetooth Dongle Apr 04, 2013 Installing the Raspberry Pi Nano Bluetooth Dongle Introduction Bluetooth is a useful tool for getting devices communicating wirelessly. If you want your Raspberry Pi interacting with anything, from a printer, to a mobile phone, to setting up media streaming, bluetooth is the way to go! The nano dongle available from ModMyPi is the perfect low cost solution, and this guide will show you how to install it. This guide

Fix, Temperature Error, Raspi

Fixing “VCHI Initialization failed” error Add user www-data to video group. Below is the command, sudo usermod -G video www-data And then restart web server”     Changing Hostname Edit below file and change the value to what you need. /etc/hostname Edit below file and replace the old hostname value against 127.0.1.1 to new name. /etc/hosts Fixing “VCHI Initialization failed” error Add user www-data to video group. Below is the command, sudo usermod -G video www-data And then restart web

I2C Library

I2C Library   https://projects.drogon.net/raspberry-pi/wiringpi/i2c-library/ WiringPi includes a library which can make it easier to use the Raspberry Pi’s on-board I2C interface. Not all systems have the I2C development libraries and headers installed, and when you buildwiringPi, it detects this at build time. If you are using these helper functions and you get link errors, it means that wiringPi is not installed with the I2C helper functions. You need to install the I2C development libraries and re-build. Under Raspbian: sudo apt-get install libi2c-dev then

Configuring I2C

Configuring I2C http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c I2C is a very commonly used standard designed to allow one chip to talk to another. So, since the Raspberry Pi can talk I2C we can connect it to a variety of I2C capable chips and modules. Here are some of the Adafruit projects that make use of I2C devices and modules: http://learn.adafruit.com/mcp230xx-gpio-expander-on-the-raspberry-pi http://learn.adafruit.com/adafruit-16×2-character-lcd-plus-keypad-for-raspberry-pi http://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi http://learn.adafruit.com/matrix-7-segment-led-backpack-with-the-raspberry-pi http://learn.adafruit.com/mcp4725-12-bit-dac-with-raspberry-pi http://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi http://learn.adafruit.com/using-the-bmp085-with-raspberry-pi   If you are using Occidentalis, then your Pi is ready to go with I2C as far as

Pi with a keypad matrix

 Pi with a keypad matrix http://hackyourmind.org/articles/2012/11/01/raspberry-pi-with-a-keypad-matrix.html Today we will see how to interfacing the Raspberry Pi with a matrix keypad usingRpi-hw library. Matrix keypad interfacing – Video The library provides the class keypad::matrix↱, defined in “rpi-hw/keypad/matrix.hpp”↱, with which it is possible to manage keypads of any size. Its constructor method takes two ordered lists containing the GPIO pins used by the device: keypad::matrix( { COL0, COL1, COL2, … }, // Column pins { ROW0, ROW1, ROW2, … } // Rows pins ) Let’s take

MPlayer, Manual

http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html MPlayer NAME SYNOPSIS DESCRIPTION INTERACTIVE CONTROL USAGE CONFIGURATION FILES PROFILES GENERAL OPTIONS PLAYER OPTIONS (MPLAYER ONLY) DEMUXER/STREAM OPTIONS OSD/SUBTITLE OPTIONS AUDIO OUTPUT OPTIONS (MPLAYER ONLY) AUDIO OUTPUT DRIVERS (MPLAYER ONLY) VIDEO OUTPUT OPTIONS (MPLAYER ONLY) VIDEO OUTPUT DRIVERS (MPLAYER ONLY) DECODING/FILTERING OPTIONS AUDIO FILTERS VIDEO FILTERS GENERAL ENCODING OPTIONS (MENCODER ONLY) CODEC SPECIFIC ENCODING OPTIONS (MENCODER ONLY) ENVIRONMENT VARIABLES FILES EXAMPLES OF MPLAYER USAGE EXAMPLES OF MENCODER USAGE BUGS AUTHORS NAME mplayer − movie player mencoder − movie encoder

How to quickly make a (sorted) playlist for mplayer

http://zuttobenkyou.wordpress.com/2009/01/17/how-to-quickly-make-a-playlist-for-mplayer/ How to quickly make a (sorted) playlist for mplayer January 17, 2009 by Shinobu See my update on July 10, 2010, below (making use of the neat “-iregex” option)! Mplayer uses a simple kind of playlist: a text file with the path and name of each file to be played. The path to the new file is relative to the location of the playlist file itself. So, you can do: 1 find -maxdepth 1 -type f -name \*.\* | sort > playlist

Getting Up and Running with MySQL for Python

http://www.packtpub.com/article/getting-up-running-mysql-python   Getting Up and Running with MySQL for Python   by Albert Lukaszewski, PhD |December 2010 | MySQL Open Source There are, several ways to get MySQL for Python in a place such that your local Python installation can use it. Which one you use will depend as much on your familiarity with your operating system and with Python itself, as it will on which operating system and version of Python you are running. In this article, by Albert Lukaszewski, PhD,

Installing the RasClock – Raspberry Pi Real Time Clock

https://www.modmypi.com/blog/installing-the-rasclock-raspberry-pi-real-time-clock Installing the RasClock – Raspberry Pi Real Time Clock Module Introduction The Raspberry Pi is an ultra-small and ultra-low cost computer. In order to achieve this size and price, several non-essential items usually found on a computer had to be omitted. Laptops and computers keep time when the power is off by using a pre-installed, battery powered ‘Real Time Clock’ (RTC). However, this Real Time Clock module is not included with the Raspberry Pi. To keep time, the Raspberry

Remove Raspberry Pi Logo on startup

Remove Raspberry Pi Logo on startup http://ananddrs.com/2013/09/18/remove-rpi-logo-startup/ The Raspberry Pi logo that shows during startup can be easily removed by adding logo.nologo to the file /boot/cmdline.txt The following command can be used to edit /boot/cmdline.txt sudo nano /boot/cmdline.txt The source of this post came from http://www.raspberrypi.org/phpBB3/viewtopic.php?t=11642&p=417828

Raspberry Pi – hiding boot messages on screen

http://ananddrs.com/2013/09/18/rpi-hide-boot-msg/ Raspberry Pi – hiding boot messages on screen There may be a time when one would want to hide boot messages that show up on the screen (or monitor or TV). The trick is to edit /boot/cmdline.txt file. One may use the following command sudo nano /boot/cmdline.txt Then make the following changes to the file: – Replace “console=tty1″ by “console=tty3″ to redirect boot messages to the third console. – Add “loglevel=3″ to disable non-critical kernel log messages. After changing,

Raspberry Pi On-Screen Keyboard

http://ananddrs.com/2013/09/25/rpi-onscreen-keyboard/ One may need to use on screen keyboard on Raspberyy Pi. One can accomplish this by using matchbox-keyboard. You can download by using the following command: sudo apt-get install matchbox-keyboard You can start by the matchbox-keyboard by using command matchbox-keyboard or sudo matchbox-keyboard

Send Commands or Data to Other Terminals

http://ananddrs.com/2013/09/25/send-commands-to-other-terminals/ Send Commands or Data to Other Terminals Somehow I need to send commands from one terminal to another. Luckily I found this postwhich saves my time. Here is a set of steps that one need to follow: Copy the code below to a C file (e.g. ttyecho.c) #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <string.h> #include <unistd.h> void print_help(char *prog_name) { printf(“Usage: %s [-n] DEVNAME COMMAND\n”, prog_name); printf(“Usage: ‘-n’ is an optional argument if you want

« Older Entries