Author Archives: Admin

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 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 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 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 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 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:×2-character-lcd-plus-keypad-for-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 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

Python RTC, 1307, Script   #!/usr/bin/env python #encoding: utf-8 # Copyright (C) 2013 @XiErCh # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the “Software”), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject

RPiconfig, Config.txt RPiconfig (Redirected from RPi config.txt) As the raspberry PI doesn’t have a conventional BIOS, the various system configuration parameters that would normally be kept and set using the BIOS are now stored on a text file named “config.txt”.The Raspberry Pi config.txt file is read by the GPU before the ARM core is initialised.This file is an optional file on the boot partition. It would normally be accessible as /boot/config.txt from Linux, but from Windows (or OS X) it would be

How To Use GPIO Pins On Raspberry Pi – Buttons And LED Tutorial What Are The GPIO Pins on Raspberry Pi? A great feature on the Raspberry Pi is the GPIO pins (stands for General PurposeInput Output). These GPIO pins on Raspberry Pi can be found in 2×13 header pins which can perform tasks include SPI, I2C, serial UART, 3V3 and 5V power. There are eight of these pins can be used directly for digital output and input (Hight and Low). These pins can be set high by connecting it to a voltage supply, or set low by

How to clone a HDD to a larger disk using linux. How to clone a HDD to a larger disk using linux.   by Peter A. Belmont / 2013-02-04 Recent Essays (All Topics) •It is becoming fashionable to say that the two-state solution for Israel/Palestine is dead •After Reading Two Articles: “Two State Illusion” and “Oslo at 20 a Failed Process” •Honest words about USA and Israel — from the American Conservative •A new USA policy on Israeli settlements •post-democracy in the USA •Criticism: 19 prominent Europeans write to the

List of files, directories in Python

List of files, directories in Python Here I present a short python program that prints the list of all files inside the current directory and subdirectories. It prints filename with relative path to the current directory. import os for root, dirs, files in os.walk(‘./’): for name in files: filename = os.path.join(root, name) print filename You can also print the list of directories only (just print the dirs). Actually I needed this stuff to solve a problem from Google treasure hunt.

Options for listing the files in a directory with Python Options for listing the files in a directory with Python I do a lot of sysadmin-type work with Python so I often need to list the contents of directory on a filesystem. Here are 4 methods I’ve used so far to do that. Let me know if you have any good alternatives. The examples were run on my Ubuntu Karmic machine. OPTION 1 - os.listdir() This is probably the simplest way to list the contents of a directory in Python.

MySQL Python tutorial MySQL Python tutorial This is a Python programming tutorial for the MySQL database. It covers the basics of MySQL programming with Python. It uses the MySQLdb module. The examples were created and tested on Ubuntu Linux. There is a similar PostgreSQL Python tutorial, MySQL Visual Basic tutorial, or MySQL PHP tutorial on ZetCode. If you need to refresh your knowledge of the Python language, there is a fullPython tutorial. You may also consider to look at the MySQL tutorial, too. About MySQL database MySQL

« Older Entries