background preloader

Raspberry Pi web server - Home

Raspberry Pi web server - Home

Share your Raspberry Pi's files and folders across a network You can share your Raspberry Pi's files and folders across a network using a piece of software called Samba, a Linux implementation of the Server Message Block protocol. You'll need to install this software: $ sudo apt-get install samba samba-common-bin Samba contains the SMB protocol, support for the Windows naming service (WINS), and support for joining Windows workgroups. $ sudo leafpad /etc/samba/smb.conf & Find the entries for workgroup and wins support, and set them up as follows: workgroup = your_workgroup_name wins support = yes The name of the workgroup can be anything you want, as long as it only contains alphabetical characters, and it matches the name of the workgroup that you want to join. You also need to add the following section of code to smb.conf: [pihome] comment= Pi Home path=/home/pi browseable=Yes writeable=Yes only guest=no create mask=0777 directory mask=0777 public=no Scroll down smb.conf until you see a section called Share Definitions, and add this code there.

Raspberry Pi Temperature Logger In this article I'm going to describe how I used a Raspberry Pi to build an SQLite based temperature logging system with a web UI. Follow this link to see the completed Raspberry Pi temperature logger with web UI. You can download the code for this project from Github: There's a button to download the project as a zip file at the bottom of the right hand column. The temperature logger consists of two parts: a script called monitor.py to measure the temperature at 15 minute intervals, and a script called webgui.py that displays temperatures in a web page. Monitor.py is triggered by a cron job. The other script, webgui.py, executes when it is requested by the Apache web server. Set up the SQLite database The first thing to do is set up a database. sudo apt-get install sqlite3 Then at a terminal type this command to enter the SQLite shell: $ sqlite3 templog.db In the SQLite shell I entered these commands to create a table called temps: 42 Comments

How to build a Raspberry Pi media centre This article was taken from the July 2013 issue of Wired magazine. Be the first to read Wired's articles in print before they're posted online, and get your hands on loads of additional content by subscribing online. Fancy an alternative to a streaming-content home-theatre setup? You can convert the Raspberry Pi into a media centre -- and you don't need to learn how to code. 1. 2. 3. 4. 5. R-Pi Troubleshooting Back to the Hub. This page lists the most common problems and suggests some solutions. See RPi_Bugs for problems that are bugs. Power / Start-up A good power supply that will supply 5 volts and at least 1 amp (5V 1A) is vital. Note that the Pi has no BIOS, so nothing will be displayed on screen unless the Pi successfully boots! Normal LED status There are five LEDS near the USB connector. See the next sections for how to interpret other statuses. Red power LED does not light, nothing on display The power is not properly connected. Red power LED is blinking The red power LED should never blink, because it is hard-wired to the 3.3V power supply rail. Red power LED is on, green LED does not flash, nothing on display Note: A faintly glowing steady green LED means no boot code has ever been executed, as almost the first thing the boot code does is to turn the faint glow off! The Raspberry Pi cannot find a valid image on the SD card. Green LED blinks in a specific pattern Coloured splash screen xset -r #!

RPi SD cards SD cards The SD card is a key part of the Raspberry Pi; it provides the initial storage for the Operating System and files. Storage can be extended through many types of USB connected peripherals. When the Raspberry Pi is 'switched on', i.e. connected to a power supply, a special piece of code called the bootloader is executed, which reads more special code from the SD card that is used to start up the Raspberry Pi. The SD card must be formatted, or written to, in a special way that means the Raspberry Pi can read the data it needs to start properly. One advantage to using an SD card like this is that you can have several SD cards, each with a different operating system, or a different purpose. Which SD card? SD cards come in three physical sizes (see picture). SD cards come in a range of storage sizes. There are other properties of SD cards that are not covered here. Other SD card content See the following links for other information: Preinstalled SD cards Verification Is this reliable?

RPi VerifiedPeripherals Back to the Hub. Hardware & Peripherals: Hardware and Hardware History. Low-level Peripherals and Expansion Boards. Screens, Cases and Other Peripherals. A note about this page: For USB devices, please specify if they required a powered hub Notes 19-Apr-2012: Now that the Model B board is shipping, details added should relate to this board and the default Debian distribution unless stated otherwise. (A) - Relates to model A production board (B) - Relates to model B production board (!) Discuss: If you are adding to a product list it would help clarity if entries are kept/added in alphabetical order. Power Usage Notes Model B Hardware Revisions and USB Power limitsHardware Revision 1.0 The original Model B board had current limiting polyfuses which limited the power output of each USB port to approximately 100 mA. Linux Driver Issues Powered USB Hubs This section has been moved to a separate page. USB Remotes USB Keyboards USB Mouse devices USB Real Time Clocks

Cheat Sheet - Physical Computing with Raspberry Pi Basic GPIO Access Setup Raspberry Pi GPIO pin layout. Diagram from eLinux. At the start of your file include: import RPi.GPIO as GPIO This gives you access to the GPIO functions in the GPIO namespace. Now set the mode to represent the numbering scheme you prefer. GPIO.setmode(GPIO.BCM) sets the pin numbering of 1 to 26 as in illustration 1. Setup the direction of a pin: GPIO.setup(12,GPIO.OUT) GPIO.setup(13,GPIO.IN, pull_up_down=GPIO.PUD_UP) This code sets up pin 12 (GPIO 18) as an output and pin 13 (GPIO 21) as an input with a pull up resistor. pull_up_down can be PUD_OFF, PUD_UP or PUD_DOWN, (default PUD_OFF). If you’re using our modified version of RPi.GPIO (you should be if using our image), then you have the extra feature of being able to turn on the alternate function for pin 4 (setting it up as a general purpose clock). Reading/Writing With your pins set up in the proper direction: Using I2C to control servos, LEDs and use PWM import i2c servos = i2c.I2C() #leds = i2c.I2C(frequency=1000)

Vero: true TV

Related: