Go to advanced search

by cae2100
Mon Feb 11, 2013 5:43 am
Forum: Python
Topic: Which sound system for reliable Python audio?
Replies: 3
Views: 2127

Re: Which sound system for reliable Python audio?

for pygame, alsa seems to work best imo and it comes as the default one.
by cae2100
Mon Feb 11, 2013 5:40 am
Forum: Python
Topic: Problems with handling "socket.gaierror"
Replies: 2
Views: 1632

Re: Problems with handling "socket.gaierror"

you could try something like this, and it'd just skip over the socket part when it cannot connect. #!/usr/bin/python # Import required libraries import urllib2 import os import socket #------------- #Check For DNS #------------- try: externaldns = socket.gethostbyname('www.google.co.uk') # result fr...
by cae2100
Mon Feb 11, 2013 5:34 am
Forum: Python
Topic: Make controle script.
Replies: 6
Views: 941

Re: Make controle script.

you could try something like this, just a bunch of try/except statements: locations=['locations that you'd scan for addresses', 'end'] bus = smbus.SMBus(1) for device in locations: try: (commands to try location on the i2c bus.) break except: try: another try statement stuff to try to search the i2c...
by cae2100
Sun Feb 10, 2013 7:10 am
Forum: Python
Topic: Running Python via VNC
Replies: 4
Views: 4264

Re: Running Python via VNC

the vnc server is trying to run everything in like a protected mode. try running it as sudo when running the program or SSH'ing into the rpi and using it that way.
by cae2100
Sun Feb 10, 2013 7:08 am
Forum: Python
Topic: pyspeech
Replies: 5
Views: 1226

Re: pyspeech

no, pyspeech uses API stuff in windows, and needs windows to run. try looking up espeak on the forums, it'll do what you want.
by cae2100
Sat Feb 09, 2013 9:42 am
Forum: Python
Topic: PyGame Transparency Problem
Replies: 3
Views: 724

Re: PyGame Transparency Problem

what type of pictures are the sprites? I had that issue when using jpg files in it, but was fine after using png images.
by cae2100
Fri Feb 08, 2013 3:23 pm
Forum: Python
Topic: i2c LED CPU meter
Replies: 11
Views: 4209

Re: i2c LED CPU meter

awesome, thank you!
by cae2100
Fri Feb 08, 2013 12:16 pm
Forum: Python
Topic: i2c LED CPU meter
Replies: 11
Views: 4209

Re: i2c LED CPU meter

cool project, I was looking for something like this a while back. Do you mind posting the code and such for your spi version? Im really interested in using the 595 with a project of mine and would love to see your schematics and code.
by cae2100
Thu Feb 07, 2013 10:44 am
Forum: Python
Topic: Python IDE
Replies: 9
Views: 8535

Re: Python IDE

on the raspberry pi, I personally use geany, and on ubuntu, I use gedit and if your dealing with GUI interfaces, eric4 is good. If your just doing text only programs, geany would be your best bet imo.
by cae2100
Thu Feb 07, 2013 10:36 am
Forum: Python
Topic: Problem with Serial port
Replies: 6
Views: 9910

Re: Problem with Serial port

I just use this, I know it's crude, but it works good for me. import serial locations=['/dev/ttyACM0', '/dev/ttyACM1','/dev/ttyACM2', '/dev/ttyACM3','/dev/ttyACM4', '/dev/ttyACM5','/dev/ttyUSB0','/dev/ttyUSB1','/dev/ttyUSB2','/dev/ttyUSB3', '/dev/ttyUSB4', '/dev/ttyUSB5', '/dev/ttyUSB6', '/dev/ttyUS...
by cae2100
Wed Feb 06, 2013 10:07 am
Forum: Python
Topic: python module installation help
Replies: 4
Views: 16366

Re: python module installation help

I usually just download the file using either wget over ssh or just ftp the files into the raspberry pi
by cae2100
Wed Feb 06, 2013 10:04 am
Forum: Python
Topic: Problem with Serial port
Replies: 6
Views: 9910

Re: Problem with Serial port

it does this if a program is still trying to access that specific port, just exit out of the program that is trying to use the arduino and replugin the arduino, then restart the program
by cae2100
Tue Feb 05, 2013 6:49 am
Forum: Python
Topic: wont start on boot /ett/init.d
Replies: 3
Views: 1036

Re: wont start on boot /ett/init.d

my guess would be that it's trying to load up the script, but the requisites arent loaded yet to run it, maybe instead of calling it from there, try running it from rc.local
rc.local loads after everything is loaded up, just before the desktop loads, so everything should be loaded by then.
by cae2100
Tue Feb 05, 2013 6:43 am
Forum: Python
Topic: python module installation help
Replies: 4
Views: 16366

Re: python module installation help

just download the source files on the raspberry pi, extract them, then go into the folder using a command line and type "sudo python setup.py build", and finally "sudo python setup.py install"
everything will be done for you from there.
by cae2100
Mon Feb 04, 2013 3:28 am
Forum: Python
Topic: Explanation of error message
Replies: 5
Views: 2232

Re: Explanation of error message

no error, it's just telling you it did an exit command.
by cae2100
Mon Feb 04, 2013 3:14 am
Forum: Python
Topic: SMTP error when sending via Python
Replies: 3
Views: 1407

Re: SMTP error when sending via Python

it doesnt mean your hostname, it's looking for the hostname of the server your trying to connect to. try changing the smtp address around and if your trying to send an email from another email service other than the one your internet is connected to, some service providers block it hence the error. ...
by cae2100
Sat Feb 02, 2013 12:18 am
Forum: Python
Topic: How to send Esc key press to application from script
Replies: 4
Views: 8240

Re: How to send Esc key press to application from script

there are various examples of this around the forum, but try looking up uinput. Here's an example of someone using it as a joystick for gaming from gpio pins, but can also be used to emulate a keyboard. http://blog.thestateofme.com/2012/08/10/raspberry-pi-gpio-joystick/ it works fine for me but I ha...
by cae2100
Fri Feb 01, 2013 10:31 pm
Forum: Python
Topic: Python GPIO timing
Replies: 3
Views: 902

Re: Python GPIO timing

well, the raspberry pi updates it's time with an NTP server over the internet, so as long as it's hooked up to the internet, you should have exact time for an alarm clock. The problem with the real time stuff and the raspberry pi deals with stuff like timing for software based PWM for servo motors a...
by cae2100
Fri Feb 01, 2013 8:12 am
Forum: Python
Topic: UART
Replies: 30
Views: 9003

Re: UART

first, do the mods to the config.txt and such to disable the serial terminal, then just use the serial port just like you would a usb-serial converter chip, here's an example: import serial usbport = '/dev/ttyAMA0' ser = serial.Serial(usbport, 9600, timeout=1) ser.write(dataout) ser.read(datain) and...
by cae2100
Fri Jan 25, 2013 5:15 pm
Forum: Python
Topic: cwiid ImportError
Replies: 2
Views: 640

Re: cwiid ImportError

IDLE seems to have issues with running programs from within itself using third party plugins. Ive noticed this on multiple occasions. I usually just run it from the command line or from geany.
by cae2100
Fri Jan 25, 2013 5:51 am
Forum: Python
Topic: Raspberry Pi and 74HC595 shift registers the easiest way
Replies: 9
Views: 7101

Re: Raspberry Pi and 74HC595 shift registers the easiest way

yea, I know, when you use other pins, you have to emulate the spi interface through software, this is called bit banging. also, the 74hc595 itself uses an spi interface to control the chip, thats what I meant by it using SPI interface
by cae2100
Thu Jan 24, 2013 10:59 pm
Forum: Python
Topic: ImportError: No module named 'PySide'
Replies: 3
Views: 5352

Re: ImportError: No module named 'PySide'

pyside isnt installed by default on the raspberry pi, but can be easily installed through the command line by "sudo apt-get -y install python-pyside". For python 3, just use this command "sudo apt-get -y install python3-pyside".
by cae2100
Thu Jan 24, 2013 10:32 pm
Forum: Python
Topic: Raspberry Pi and 74HC595 shift registers the easiest way
Replies: 9
Views: 7101

Re: Raspberry Pi and 74HC595 shift registers the easiest way

the 74hc595 uses an SPI interface to be controlled from the raspberry pi or any microcontroller.
I used to mess with PIC microcontrollers and have used that chip a few times to add 7 segment displays to my projects.
by cae2100
Thu Jan 24, 2013 8:29 pm
Forum: Python
Topic: Raspberry Pi and 74HC595 shift registers the easiest way
Replies: 9
Views: 7101

Re: Raspberry Pi and 74HC595 shift registers the easiest way

nice use of bitbanging SPI port, have you seen the SPI-Py library? it's the one I use and it uses the actual SPI interface on the raspberry pi, so it runs faster and hardware based.

https://github.com/lthiery/SPI-Py/wiki/Functions

Go to advanced search