Tag Archives: python

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

Send Email using Python…

Send Mail Through Gmail with Python by MARK SANBORN on June 30, 2009 Python is a great scripting language for Linux and it is often used to automate tasks or check on overall system health. Discover how to send emails through Gmail with Python. Good system admins get to know scripting languages well and sometimes use them for all kinds of purposes, from scripts that do backups to complex automated tasks. Often times it would be nice to get an email notification

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,

Looping video playlist with Omxplayer on the Raspberry Pi

Looping video playlist with Omxplayer on the Raspberry Pi http://www.cenolan.com/2013/03/looping-video-playlist-omxplayer-raspberry-pi/ The Raspberry Pi comes with an awesome little video player called Omxplayer that is very capable of playing back full 1080p video perfectly when encoded correctly in H.264/AAC. One problem is the current lack of playlist support in omxplayer, so this post explains how to create a bash script that will permanently loop through and play a directory of videos.   First install omxplayer: sudo apt-get install omxplayer Now create this script named for

Looping videos seamlessly OMXPlayer

http://www.sundh.com/blog/2013/10/loop-videos-seamlessly-omxplayer/ Looping videos seamlessly OMXPlayer Ellen 16:30 on October 15, 2013 As I looked for different solutions for looping videos on the Raspberry Pi seamlessly I eventually came out with a solution that worked quited good for videos looping with sounds. Looking at the possiblities of using the existing example of hello_video/video.c to loop a video wasn’t an option as sound was not supported and syncing sound was not something I wanted to spend time on. Instead I looked to jbaiter’s OMXPlayer library pyomxplayer build in

Raspberry Pi playing a video in loop

http://www.mindemedia.no/wordpress/?p=16 Raspberry Pi playing a video in loop May 11, 2013 So there is gonna be an art exibition where i work, its mainly video art, so they will need six projectors showing one piece of video each, and they are all gonna run in loop, all day long. There are several boxes that can play video, and still be cheaper than the mini-mac, but none as cheap as the raspberry pi. So i decided to see if i could

Raspberry Pi playing a video in loop

http://www.mindemedia.no/wordpress/?p=16 Raspberry Pi playing a video in loop May 11, 2013So there is gonna be an art exibition where i work, its mainly video art, so they will need six projectors showing one piece of video each, and they are all gonna run in loop, all day long. There are several boxes that can play video, and still be cheaper than the mini-mac, but none as cheap as the raspberry pi. So i decided to see if i could make

Install HTPC, Manage your HTPC from anywhere

http://htpc.io/installation.html   Installation Jump straight to: Osx - Windows - Linux Installing HTPC Manager can be really easy but might also cause some problems. The main requirement is you run Python. Python 2.7 is in most cases the way to go. The difficult part is installing the Python Image Library. Python Image Library The Python Image Library or PIL, is used to convert and resize images retrieved from the Xbmc Api. Installing PIL is, depending on your OS, not so easy. This guide should help

Reading and writing from GPIO ports from Python

http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/  Raspberry IO Log In Sign Up Reading and writing from GPIO ports from Python Overview 1 2 3 4 5 6 7 Created by: coderanger Published Mar. 13, 2013 This tutorial covers the setup software and hardware to read and write the GPIO pins on a Raspberry Pi running the latest Raspbian operating system. We will showing how to read from a physical push-button from Python code, and control an LED. Related categories: Tutorial Step 1: Install Python development tools Open

HOW-TO:Write Python Scripts for XBMC

http://wiki.xbmc.org/index.php?title=HOW-TO:Write_Python_Scripts_for_XBMC HOW-TO:Write Python Scripts for XBMC This article was originally a copy of a python HOW-TO tutorial was prepared by Nelson Minar. The article have since then been reformatted, restructured, modified and updated several times. Contents [hide] 1 XBMC Python Scripting Tutorial 1.1 Python is not a snake 1.2 Some basic rules – be careful of the snake! 1.3 Always notice the snake behavior 1.4 the real work begins 1.4.1 Window 1.4.2 pad button 1.4.3 add (and remove) text label 1.4.4 init parameters 1.4.5 dialog box 1.4.6 buttons 1.4.7 virtual keyboard 1.4.8 Lists 1.4.9 Screen

Python tutorial From ZetCode.com

http://zetcode.com/lang/python/ Python tutorial This is Python tutorial. In this tutorial, you will learn the basics and more advanced topics of the Python language. Table of contents Python language Interactive Python Lexical structure Data types Strings Lists Dictionaries Operators Keywords Functions Files OOP Modules Packages Exceptions Iterators & Generators Introspection Python Python is a general-purpose, dynamic, object-oriented programming language. The design purpose of the Python language emphasizes programmer productivity and code readability. Similar tutorials Scripting languages tutorials on ZetCode include PHP tutorial and Ruby

MySQL Python tutorial

http://zetcode.com/db/mysqlpython/ 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

Python Joystick Test

  Instalasi & Testing Koneksi Joystick   import pygame as p p.init() stick = p.joystick.Joystick(0) stick.init() print(“initialized:”,bool(stick.get_init())) print(stick.get_name()) while stick.get_axis(0)*100 < 399: print(round(stick.get_axis(0)*100)) #need for right detection otherwise stick.get_axis always returns 0 for event in p.event.get(): None p.quit()