Go to advanced search

by billio
Sat Mar 16, 2019 11:10 am
Forum: Raspbian
Topic: Stretch dist-upgrade - failed to Load Kernel Modules
Replies: 0
Views: 377

Stretch dist-upgrade - failed to Load Kernel Modules

I just performed a dist-upgrade and on rebooting the system the boot showed the message : FAILED .. failed to Load Kernel Modules the boot carried on the desktop as expected but the USB mouse and keyboard no longer work so I am stuck. Switching off and on produces the same result. Is there any solut...
by billio
Sat Jul 14, 2018 12:03 pm
Forum: Python
Topic: Live keyboard entry onto display
Replies: 3
Views: 363

Re: Live keyboard entry onto display

pygame has functions to handle keyboard entry, it is already loaded on the RPi

There is also a python module called 'keyboard' that can loaded using pip.
by billio
Tue Aug 29, 2017 12:16 pm
Forum: General discussion
Topic: Camera
Replies: 4
Views: 619

Re: Camera

I have used an application called "Cheese" to connect a USB camera to a RPi. Although I have not used it, the OpenCV package looks as though it might be a good starting point for programming. If you want a Python 2 interface to OpenCV : sudo pip install opencv with documentation at http://opencv-pyt...
by billio
Sat Mar 25, 2017 12:12 pm
Forum: Raspbian
Topic: Black title bar background for in-focus window
Replies: 1
Views: 547

Re: Black title bar background for in-focus window

I have avoided this problem by loading obconf (openbox configuration) and switching from the Pixel theme to one of the other themes. The text and the icons are now displayed when the window is in focus.
Will it be possible to edit the Pixel theme ?. Where is this stored ?.
by billio
Tue Mar 21, 2017 8:54 pm
Forum: Raspbian
Topic: Black title bar background for in-focus window
Replies: 1
Views: 547

Black title bar background for in-focus window

I have been having this problem for a few weeks. I have an up-to-date version of Pixel. The title bar of the in-focus window has a black background and therefore it is impossible to see the text and window icons so for example I cannot click on an icon to close the window. When the window is not in ...
by billio
Sat Mar 28, 2015 3:53 pm
Forum: Troubleshooting
Topic: urlopen
Replies: 3
Views: 937

Re: urlopen

Just a simple update on this thread. There is a Python library called "feedparser" which can be used to directly parse an RSS/Atom response. It presents the XML response as a dictionary. This library is installed using pip. So to get the most recent weather observation for a place : import feedparse...
by billio
Tue Oct 28, 2014 12:12 am
Forum: Python
Topic: Exiting from a for and while loop
Replies: 5
Views: 1814

Re: Exiting from a for and while loop

Your code is a little obtuse, is this what you meant to happen ?. Set 10 high, then Set 26 high and low very quickly for 1000 times or until the switch status is 0, then Set 10 low def function1(): totalSteps = 1000 stepsDone = 0 GPIO.output(10,GPIO.HIGH) while switch == 1 and stepsDone < totalSteps...
by billio
Sat Oct 25, 2014 6:56 pm
Forum: Python
Topic: How to use "or"
Replies: 6
Views: 1153

Re: How to use "or"

Just to indicate an alternative way of doing this avoiding the "or" :

Code: Select all

if answer in ["continue","i want to continue"] :
    # do whatever you want to do
or in a different situation :

Code: Select all

if answer not in ["quit","stop","halt","bye"] :
    # carry on
by billio
Wed Oct 15, 2014 12:22 am
Forum: Python
Topic: Right way of PRINTING values in python3?
Replies: 5
Views: 935

Re: Right way of PRINTING values in python3?

Try this, do you still have the error : print( """ TX23 sensor reading Datetime: {dt:s} Speed: {sp:s} m/s Direction: {di:s} Degrees: {de:s}""" .format( dt=datetime.datetime.fromtimestamp(output['timestamp']).strftime('%d/%m/%Y - %H:%M:%S')), sp=data['speed'], di=data['direction'], de=data['degrees']...
by billio
Tue Oct 14, 2014 11:35 pm
Forum: Python
Topic: PiFace Inputs
Replies: 10
Views: 1582

Re: PiFace Inputs

This discussion on "stackoverflow" will help. http://stackoverflow.com/questions/419163/what-does-if-name-main-do If you have any questions about Python, stackoverflow is a good place to look for an answer. However, it is possibly better to use this forum for specific Raspberry Pi related Python que...
by billio
Fri Oct 03, 2014 8:43 pm
Forum: Python
Topic: Cherrypy.config.update problem
Replies: 3
Views: 1468

Re: Cherrypy.config.update problem

Just looking at your code, the return line in def index(self): is incorrectly indented. Also, in the html, the meta tag should be within <head></head> tags. And in your meta tag, the content attribute is not properly quoted: "6" In the examples I have seen, cherrypy.config.update() is used before ch...
by billio
Mon Sep 22, 2014 10:13 pm
Forum: Python
Topic: Send Data from RPi to RPi via WiFi
Replies: 9
Views: 2794

Re: Send Data from RPi to RPi via WiFi

You might make some progress by reading this :

https://docs.python.org/3/howto/sockets.html

which is a basic introduction to network programming in Python.
by billio
Mon Sep 22, 2014 8:05 am
Forum: Camera board
Topic: Picamera import problem
Replies: 1
Views: 565

Re: Picamera import problem

An update to the firmware between 15th and 19th September looks to have fixed this problem. "import picamera" now works OK. Thanks.
by billio
Thu Sep 18, 2014 10:55 pm
Forum: Camera board
Topic: Picamera import problem
Replies: 1
Views: 565

Picamera import problem

When I try to import picamera I get an error : OSError: libmmal_components.so: cannot open shared object: No such file or directory Please can someone give me a hint on how to solve this problem. Just before trying out picamera and finding this error message I have updated operating system and kerne...
by billio
Wed Sep 10, 2014 6:39 pm
Forum: Python
Topic: Python with dallas temp and photocell sensors
Replies: 2
Views: 800

Re: Python with dallas temp and photocell sensors

Is it not something to do with
lines =read_temp_raw
this is assigning the function read_temp_raw to lines, not a list of text lines returned by read_temp_raw.
The error message is telling you that lines contains a function, not a list .
by billio
Tue Sep 09, 2014 10:46 pm
Forum: Python
Topic: Create a loop
Replies: 3
Views: 1273

Re: Create a loop

Here are a couple of suggestions. The "while" loop is OK but usually if you want to loop forever "while True" is the normal way of doing this. However, you may want to get out of this loop at some stage, especially when testing, so a "try .. finally ... " structure is a better way of coding the loop...
by billio
Mon Aug 18, 2014 7:50 pm
Forum: Python
Topic: problem in gpio setup
Replies: 3
Views: 816

Re: problem in gpio setup

You can find out which version of RPi.GPIO you are using by running your program with the -i option which ends in the Python command line, then , in your case, enter GPIO.VERSION . My version is 0.5.6 . But why not load the program into idle and then run it : sudo idle filename.py which has the adva...
by billio
Wed Jul 09, 2014 7:31 am
Forum: Python
Topic: using 2 serials
Replies: 10
Views: 2034

Re: using 2 serials

A simple quick way of testing is to insert some print statements into your code at strategic points to help identify what the program is doing.

Have you read this : http://stackoverflow.com/questions/2155 ... g-practice
by billio
Mon Jul 07, 2014 9:03 pm
Forum: Python
Topic: Retaining variables within functions
Replies: 27
Views: 3531

Re: Retaining variables within functions

Returning to your original code I would like to add some points that might be useful though they don't directly answer your question: a = [1,2,3,4,5,6] for i in a: # do something with i allows you do what you show in the code, and doesn't risk an error when the value of y moves beyond the length of ...
by billio
Fri Feb 28, 2014 7:23 pm
Forum: General discussion
Topic: Are ARM based computers the future?
Replies: 77
Views: 12509

Re: Are ARM based computers the future?

Apart from the technical difference between ARM and Intel, there is a significantly different business model. ARM = a design company, licensing intellectual property to the chip makers. Intel = an end-to-end design and manufacturing company. At the moment the ARM approach has driven it's phenomenal ...
by billio
Tue Oct 01, 2013 12:55 pm
Forum: Advanced users
Topic: Coder takes its power from Airport Extreme
Replies: 3
Views: 1895

Re: Coder takes its power from Airport Extreme

Just to add to this thread. I purchased a TP-Link Model TL-WR710B mini pocket router. When this is connected to the mains through the built-in plug and connected to the Raspberry Pi though a USB cable (for power) and an Ethernet LAN connector (small cable supplied), this provides access to the Pi th...
by billio
Fri Sep 20, 2013 2:36 pm
Forum: Advanced users
Topic: Coder takes its power from Airport Extreme
Replies: 3
Views: 1895

Re: Coder takes its power from Airport Extreme

OK. I have set-up access using smb, which works fine.

With regard to the power requirements affecting the Airport Extreme. The Pi is only powering the processor etc. and the ethernet port which I would have thought was well below 0.5 amps.
by billio
Fri Sep 20, 2013 10:35 am
Forum: Advanced users
Topic: Coder takes its power from Airport Extreme
Replies: 3
Views: 1895

Coder takes its power from Airport Extreme

I just realised that the USB port on an Airport Extreme lets me power a PI: run the power cable from the USB port. The Pi is running Coder (there is a short ethernet cable) so there is nothing else attached to the Pi thus the power requirement should be low. But I will see how it goes. This seems a ...
by billio
Sat Sep 14, 2013 12:54 pm
Forum: General discussion
Topic: Google Coder for Raspberry Pi
Replies: 2
Views: 668

Google Coder for Raspberry Pi

Which will be the best forum to discuss this initiative ?.

[http://googlecreativelab.github.io/coder/]

It looks extremely interesting.
by billio
Tue Aug 20, 2013 11:26 am
Forum: General discussion
Topic: external battery
Replies: 5
Views: 847

Re: external battery

Ohm's Law applies, the Pi providing the resistance, the value of which depends on what the Pi and it's peripherals are doing at any one time.

Go to advanced search