Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs.

learn more… | top users | synonyms

0
votes
0answers
4 views

Python, C, I2C, calling binary with arguments, and printing output

I have a C binary that takes 1 argument. I need to have Python run the binary, and return the output. Using subprocess.Popen (and check_output), the C binary fails when trying to write to the I2C ...
1
vote
2answers
11 views

Python and OpenSSL error on import

So I'm trying to add SSL to my web server running on my pi B+ (using cherrypy) I made sure that OpenSSL was installed with: sudo apt-get install openssl Then I installed pyOpenSSL with: sudo ...
0
votes
0answers
15 views

ImportError: No module named HT16K33

When I am importing a library (specifically Adafruit_LED_Backpack using Python3) I get the error ImportError: No module named HT16K33 How do I install that library? EDIT: when using Python 2.7, the ...
0
votes
0answers
6 views

Create a playlist using pygame.mixer [migrated]

I have been trying to make a simple playlist that plays 3 songs one after the other the code below shows an attempt of that. Rather than playing the first song music1.mp3 it plays the last song ...
2
votes
0answers
23 views

Raspberry Pi Camera - When is it ready for next frame

When using apis like the C++ or raspicam api, you poll the camera with a grab(), or similar, method. When a frame is ready, the method returns. Is there a way of checking if the camera is ready ...
0
votes
1answer
32 views

HC-SR04 distance sensor doesnt work

I try to make HC-SR04 distance sensor on my rasp pi robot but it doesnt work and I don´t know where is problem. Here is my python code. Program stop in first while loop. VCC is connect to PIN 2. ...
4
votes
2answers
100 views

Building a Raspberry Pi network monitor. My code is not working

Long story short. I moved, put my home server is a closet and started worrying about temp and humidity, saw a guide online to make a network temperature and humidity monitor from a rasberry pi and an ...
0
votes
1answer
29 views

Is there a way to see which GPIO pins are inuse with the python RPi.GPIO module?

I want to be able to toggle a pin on and off for output. e.g. pin 12 Something like this import RPi.GPIO as io io.setmode(io.BOARD) if not io.pinInUse(12): io.setup(12,io.OUT) else: ...
0
votes
0answers
28 views

Internet radio using PiFace CAD

I’m working on a Ethernet radio project using a Raspberry pi. I found some example code that I have tested and is working. (Source:- ...
0
votes
0answers
22 views

sudo apt-get syntax error in Python shell?

Was all working fine until I edited /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf to get wlan0 to auto connect on boot. Any ideas?
1
vote
1answer
54 views

Tiny picture using opencv2 and v4l2 driver

I'm using opencv2 and V4L2 driver on my pi and have managed to get a tiny picture out of the Raspberry Pi Camera Module with the following script: #!/usr/bin/env python import cv2 camera_port = 0 ...
-4
votes
0answers
55 views

Things I should but don't know, coz everyone assumes we do

frequently I come accross the option to download wrappers. For example the instapush Python wrapper. Ok so I download it. I can extract it but then what ? To summarise I am trying to set up a push ...
0
votes
2answers
31 views

Cron error with Python script

I have a python script that I would like to run in every hour. The cron command look like this: 54 * * * * root python /home/pi/moka/olx_multi.py 2>&1 The script is not running and I ...
0
votes
0answers
19 views

1602 LCD display initiating

I bought an assembled 1602 lcd display which should work with the Adafruit codes (http://www.banggood.com/Negative-16-x-2-LCD-Keypad-Kit-RGB-Backlit-For-Raspberry-Pi-p-960166.html) I downloaded the ...
2
votes
1answer
20 views

Using a class function as callback with gpio.add_event_detect

I want to set a callback function to run when an event occurs in a GPIO. Im designing a class and I want to have the callback method inside it too. Here's the code: import RPi.GPIO as gpio class ...
0
votes
1answer
35 views

Running a python simple script at startup/boot [duplicate]

Can anyone please help me to run a simple python script at start up? (for eg. let the script print hello) please explain me step by step,,,starting from basic steps! I tried many examples using ...
0
votes
1answer
34 views

TLC5947 with a Raspberry Pi

I have been trying to get 8 RGB leds to work with a TLC5947 driver using a Raspberry Pi. But I am not able to get the leds to work. I have tried with the help of fpulse from Wrobbel. But this did not ...
1
vote
1answer
34 views

problem with LED matrix setup with raspberry pi model B+

I have a raspberry pi model B+ , and an 8x8 LED matrix(single colored) , so I connected 8 GPIO pins to the 8 row pins of the matrix and another 8 GPIO pins to the 8 colomn pins. Note that I am pretty ...
0
votes
0answers
48 views

read a RFID card MiFare 1k classic through a PN532 uart reader with serial.read()

I'm trying to read my rfid card MiFare 1k classic with a PN532 breakout board through UART with a simple python script. I installed libnfc, the nfc-poll example program reads my card perfectly fine. I ...
1
vote
1answer
26 views

extend the current for PWM LED Control

i am using the raspberrypi to have 2 led's fade up and off. My script works and its ready to go. But i need to get my LED's brighter. Is there a way to extend the GPIO Current of the rasperry pi ? ...
2
votes
1answer
42 views

Powering several LEDs from GPIO output

I'm currently working on a "rotating cube" project where a raspberry pi will be used to determine which cube face is at the top and any given time using an accelerometer and light it up with LEDs. ...
0
votes
0answers
58 views

Dual Channel Relay Python Script

I am a Python noob, and recently purchased a 2 channel relay module from sunfounder. I wired it up to my Pi, and the relay turned on and stays on. I am wondering if any one can provide my with the ...
0
votes
0answers
28 views

How can I read if there's any activity on the serial port?

I have a PIR-sensor and a controller hooked up to my USB, and I can read in the Terminal the controllers output if there's any motion using serial.readline(). But what I really want to do is just to ...
1
vote
1answer
34 views

Noir camera not disengaging when program closed

I am using a python script to access my NoIr Pi camera module via the "picamera" package. Yesterday everything was working fine. Today everything is still working fine, however whenever I close my ...
0
votes
1answer
53 views

pigpio import into Python and dc motor pwm control

I am trying to control the enable pin on my L293D motor controller with pwm signal from the pigpio library. I have got to the point where when I execute this code: import Tkinter as tk import pigpio ...
0
votes
0answers
27 views

GPIO wait_for and signal.alarm

I have a python program that runs on my pi fine using GPIO.wait_for_edge(channel, GPIO.RISING) until i call signal.signal(signal.SIGALRM, handler) signal.alarm(1) after the alarm fires i get the ...
0
votes
0answers
10 views

How do I write remote machine Path in askopenfilename

I am writing a program in python on Ubuntu, to remove a file by accessing RaspberryPi, connected with network. For file selection I am using a command called askopenfilename. But I am struggling in ...
0
votes
4answers
80 views

How To Start Learning Python For Raspberry Pi? [closed]

I have old version of Raspberry Pi (Revision B) and now I am planning to create a robot with it. However, I don't know python at all. I want to learn python but haven't found any tutorial that teaches ...
1
vote
1answer
71 views

PiGPIO Library Example for Bit-Banging a UART

The PiGPIO library http://abyz.co.uk/rpi/pigpio/index.html mentions that one of it's features is "software serial links using any user gpio". I take this to mean that you can use it to generate a ...
0
votes
2answers
67 views

Recording Temperature and Humidity Data to a Memory Stick

I have a Adafruit DHT22 sensor connected to my Raspberry Pi B+. I want to put this in an outbuilding to monitor the temperature and humidity over a period of time. The building has mains power but ...
0
votes
1answer
16 views

How to display kannada fonts using TFT display

Can anyone suggest me how to display Kannada fonts using TFT display. How do I convert English to Kannada fonts?
0
votes
1answer
34 views

Use OR Operator Between Two GPIO on python [closed]

I am writing a short program in Python on the Raspberry Pi, to stop a while loop by any of the one GPIO from two, but it is not stopping the loop. Although, if I use GPIO individually its successfully ...
0
votes
0answers
19 views

Python Gui Gtk.main() block execution thread

I have a problem with raspberry pi when I execute a python code on device. My software ask data to server and show this data in a Gtk Interface (that I design with glade). Because I must update every ...
3
votes
2answers
131 views

Raspberry Python Libraries

I am currently working with a Raspberry Pi (Model B+) and have some experience with Arduino (and it's derivates). Now, there are three Libs for GPIO access with Python for the Pi: WiringPi ...
0
votes
1answer
50 views

How do I port my game to the Raspberry Pi?

I am working on a game and would like to be able to play it on my Raspberry Pi. Right now it's browser based, but I'm not married to that. Today I ported it over to Pygame, but it's way too slow. I ...
2
votes
0answers
49 views

Delay Problem in Audio/Video when Multiplex in One through Python

I am writing a program in python on RaspberryPi, to record video on a Picam and capture audio through a Microphone attached with USB AUDIO DEVICE. On combining both files through ffmpeg, till 30sec ...
1
vote
1answer
67 views

Stop while Loop by GPIO INPUT in Python [closed]

I am writing a program in python on RaspberryPi, to stop While loop through GPIO input. I don't know why it is not working. Can you please look on my coding and guide me to resolved it? import ...
0
votes
1answer
44 views

Change the GPIO pull_up_down=GPIO.PUD_UP to GPIO.PUD_DOWN?

Im working on something similar these link: Connecting a Push Switch But with few changes: LED attached and wish the LED to be high only when the switch is pressed. I tried something like ...
0
votes
0answers
38 views

Python script always throws exception the first it is ran after reboot

I am trying to build a home automation system with Raspberry Pi connected to Arduino Uno via USB. Everything works but the Python script that I am using for reading variables from Arduino is always ...
1
vote
1answer
239 views

installing OpenCV 3.0 on raspberry pi b+

Is it possible to install OpenCV 3.0, opencv python on Raspberry pi b+? How to install and are there any precompiled binaries available ?
0
votes
3answers
121 views

Controlling a continuous servo with raspberry pi

As the title states I want to be able to control a continuous rotation servo and use it as a wheel for my rc car. I have installed ServoBlaster but I can't find any tutorial or example on how to send ...
-1
votes
0answers
18 views

Use PyOpenGL on Raspberry Pi

Does anybody has an running simple and little example to use the PyOpenGL lib with OpenGLES 2 on the Raspberry Pi? I can't really find something that is python related.
0
votes
0answers
5 views

Getting a '\n' (new line by default) during a subprocess call) on date format why? [migrated]

Here the trace IOError: [Errno 2] No such file or directory: 'security01/30/15,15:32:58\n.jpg' #how and why \n come here? for these line: p = subprocess.Popen(['date +%m/%d/%y,%H:%M:%S'] ...
0
votes
1answer
318 views

spidev.xfer2 in python gives IOError: [Errno 22] Invalid argument

I am currently trying to follow this tutorial. I keep running into errors for the RPi part. I have received several error related to SPI. I removed SPI from my blacklist and followed the instructions ...
0
votes
0answers
21 views

Raspberry PI B+ GPIO not responding [duplicate]

I'm still a beginner, but I can't make heads or tails of this. My new Raspberry PI B+ GPIO pins don't seem to be actually changing when I run python code essentially straight from the web. Am I ...
0
votes
0answers
7 views

Combining an audio file with video file in python [migrated]

I am writing a program in Python on RaspberryPi(Raspbian), to combine / merge an audio file with video file. Format of Audio file is WAVE Format of VIdeo file is h264 Audio and video already ...
1
vote
1answer
129 views

Creating a 0-10V voltage range for ballasts using Raspberry PI and amplifiers [closed]

I have been working on automating my house and i was looking to dim and brighten the lights (not only led) using ballasts which require input voltage of range 0 to 10v DC depending on which the light ...
0
votes
1answer
87 views

ImportError No module named utils

I am trying to run a program in python on RaspberryPi from stackexchange but getting an error ImportError: No module named utils Can you please help me resolve this issue? import pyaudio, wave, ...
1
vote
0answers
31 views

I2C PIC18F2520 and PI

I am having a big problem to communicate a PI with PIC using I2C. When I try to use another PIC as master everything works fine, no problem. But swtich to PI I cant get it to work. To start my both ...
1
vote
2answers
64 views

what is resistance of the GPIO outputs

I am building a simple resistor / capacitor in series (RC) circuit to measure resistance with my RPi A+. RC Design This design is similar to the one used in this tutorial as suggest on this post. ...