Go to advanced search

by evansg515
Wed Aug 28, 2013 11:23 am
Forum: Python
Topic: Python + PiGlow Programming Help
Replies: 3
Views: 2746

Re: Python + PiGlow Programming Help

Steve, The psutil function cpu_percent() will return a float that corresponds to your cpu usage ranging from 0-100. You already have that stored in the variable cpu however your cpu value will never change as it is only calculated once (when the script runs). That variable needs to be assigned every...
by evansg515
Wed Jun 19, 2013 2:47 pm
Forum: Python
Topic: Pi to Pi communication
Replies: 11
Views: 29092

Re: Pi to Pi communication

I'm presuming you want to be wireless? There are a few Serial Radio's available (Google: XRF Modules by Ciesco or Xbee Radios) You simply wire up the small radio to the UART pins on the Pi and write a simple python serial reader / writer program. I've done this and its really simple. Also you could ...
by evansg515
Thu May 23, 2013 10:57 am
Forum: Python
Topic: Adafruit 16x2 RGB LCD and read a text file
Replies: 4
Views: 3253

Re: Adafruit 16x2 RGB LCD and read a text file

OK, So i'm pretty new to python too but I have been playing with this display for a while. Turning your screen off lcd.backlight(OFF) should be lcd.backlight(lcd.OFF) Or I'm pretty sure there is an lcd.Stop() function in there. Scrolling is tricky(ish) lcd.scrollDisplayLeft() should move the display...
by evansg515
Sun May 19, 2013 7:00 am
Forum: Advanced users
Topic: STICKY: HOWTO: Move the filesystem to a USB stick/Drive
Replies: 334
Views: 494101

Re: HOWTO: Move the filesystem to a USB stick

Amazing thank you.
by evansg515
Wed May 15, 2013 11:22 am
Forum: Python
Topic: Waiting for a button push while doing something else ?
Replies: 5
Views: 1607

Re: Waiting for a button push while doing something else ?

My original post was obviously rubbish as I can't seem to find any exception that detects keyboard input other than keyboardInterrupt.

This looks good though:
http://www.tutorialspoint.com/python/py ... eading.htm
by evansg515
Wed May 15, 2013 10:57 am
Forum: Python
Topic: Waiting for a button push while doing something else ?
Replies: 5
Views: 1607

Re: Waiting for a button push while doing something else ?

I'm new to python etc myself but I think you may be able to do something like:

Code: Select all

global? var = x
def loop():
  While 1:
    #Do loop stuff
  Except Keypress:
    if keypress == something:
      global? var = y
      loop()
Not sure about the global stuff, like I said I'm learning myself.

Titch
by evansg515
Wed May 15, 2013 10:51 am
Forum: Python
Topic: GPS position fix LED ?
Replies: 4
Views: 1793

Re: GPS position fix LED ?

Learn to walk before you can run. Look for some python tutorials and learn how to code. You will find it much more rewarding, raspberry pi is about education. The following line holds the key to your code #Retrieve current position gpspos = GPS.getActualPosition() Scotty is correct, you really shou...

Go to advanced search