Tag Archives: gpio

How to use interrupts with Python on the Raspberry Pi and RPi.GPIO

http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio How to use interrupts with Python on the Raspberry Pi and RPi.GPIO  Input and Output, interfacing, python programming, raspberry pi Add comments Mar172013   The latest big news in the world of Raspberry Pi Python GPIO programming is that Ben Croston has released an update for RPi.GPIO. Why is that a big deal? Because this version has interrupts. “What’s an interrupt?” I hear you say. It’s a way of waiting for something to happen without checking constantly whether or not it’s happening. Imagine that

How to use interrupts with Python on the Raspberry Pi and RPi.GPIO – part 3

http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio-part-3 Multiple threaded callback interrupts in Python We’ve been learning about interrupts this week because of the brand new interrupt capabilities of RPi.GPIO. We covered a simple “wait for” interrupt in part 1, threaded callback interrupt and button debouncing in part 2 and today we’re getting sophisticated with multiple threaded callbacks. “WoooooooooOOOOOOOOOOOOOOOooooooooooo”, I hear you say. Well actually, we’re not doing much that’s very different from last time, except, now there’s more of it. We’ll add another button and another threaded callback function

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

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()