Go to advanced search

by ben_nuttall
Tue Nov 07, 2017 3:24 pm
Forum: User groups and events
Topic: How many Code Clubs are there in South Africa and where are they held?
Replies: 1
Views: 405

Re: How many Code Clubs are there in South Africa and where are they held?

According to https://www.codeclubworld.org/ there are 32 clubs in South Africa:
Screenshot from 2017-11-07 15-22-48.png
Screenshot from 2017-11-07 15-22-48.png (10.85 KiB) Viewed 219 times

Just enter the country name in the field and it tells you about the activity in that country.
by ben_nuttall
Mon Nov 06, 2017 3:23 pm
Forum: Weather station
Topic: Help with python scratch module
Replies: 13
Views: 1080

Re: Help with python scratch module

Thanks to Ben Croston for pushing out a new release! piwheels picked up the new scratch 1.0.0 release and built it as a wheel so Stretch users will get this now. And the source tarball is still available from PyPI for those not configured to use piwheels. So just "sudo pip3 install scratch" will wor...
by ben_nuttall
Sat Nov 04, 2017 1:02 pm
Forum: Weather station
Topic: Help with python scratch module
Replies: 13
Views: 1080

Re: Help with python scratch module

DougieLawson wrote:
Thu Nov 02, 2017 4:29 pm
viewtopic.php?f=66&t=194886
Unrelated. For some reason it works if you install from piwheels but not from pypi.
by ben_nuttall
Fri Nov 03, 2017 10:44 am
Forum: Raspbian
Topic: /etc/pip.conf is badly broken
Replies: 9
Views: 763

Re: /etc/pip.conf is badly broken

An issue caused by pip converting . to - when searching for dependencies meant that pip would look in the wrong piwheels directory for packages with . in the name, breaking it. This has been resolved: https://github.com/bennuttall/piwheels/issues/20#issuecomment-340108171 If you find any issues with...
by ben_nuttall
Wed Oct 11, 2017 1:47 pm
Forum: The Staffroom
Topic: My (current) Teacher Wishlist (from a developing country)
Replies: 4
Views: 847

Re: My (current) Teacher Wishlist (from a developing country)

Database projects - please. Is there a tiny SQL out there that runs on the Pi? We need some great tutorials that start a the beginning. Does anyone make a fairly light-weight DB app with a GUI for Raspbian? I just wrote an article on this: https://opensource.com/article/17/10/set-postgres-database-...
by ben_nuttall
Mon Jul 31, 2017 5:25 pm
Forum: Python
Topic: piwheels: building a faster Python package repository for Raspberry Pi users
Replies: 0
Views: 214

piwheels: building a faster Python package repository for Raspberry Pi users

Something I've been working on for a little while: piwheels. Have you ever run "pip install <package>" and it's been incredibly slow? That's because you have to download and build the source code yourself. However, a solution to this exists: Python wheels is the standard for distributing pre-built P...
by ben_nuttall
Mon Jun 05, 2017 12:08 pm
Forum: User groups and events
Topic: A sign of the times perhaps
Replies: 8
Views: 2570

Re: A sign of the times perhaps

I think it's important that people have some patience and understanding with staff and volunteers in these circumstances. Holding an event just a couple of days after a terrorist attack, they will have been briefed to be on alert and take certain measures to keep the venue safe - not much time for a...
by ben_nuttall
Mon May 29, 2017 9:35 pm
Forum: User groups and events
Topic: A sign of the times perhaps
Replies: 8
Views: 2570

Re: A sign of the times perhaps

I was at the Norwich Jam and was aware of security checking people's bags on entry - which is understandable - but wasn't aware anyone had been refused entry. What was in the bag that they wouldn't allow in?
by ben_nuttall
Wed Apr 12, 2017 3:03 pm
Forum: The Staffroom
Topic: AllseeingPi
Replies: 4
Views: 1716

Re: AllseeingPi

I think that's the issue - you'll need the Python 3 version of PIL. The package is "python3-pil" not "python-pil".
by ben_nuttall
Wed Apr 12, 2017 1:28 pm
Forum: The Staffroom
Topic: AllseeingPi
Replies: 4
Views: 1716

Re: AllseeingPi

It could be one of several things. If you can answer the following questions I'll do what I can to identify the problem. - Which version of Python are you using? (2 or 3) - Are you using Raspbian Jessie? (from raspberrypi.org/downloads) - Has your SD been kept card up-to-date? (regular/recent apt-ge...
by ben_nuttall
Tue Mar 21, 2017 4:46 pm
Forum: General discussion
Topic: Missing web page
Replies: 2
Views: 254

Re: Missing web page

That resource has been superseded by the 'Physical Computing with Python' resource: https://www.raspberrypi.org/learning/physical-computing-with-python/ If you need access to the old resource, you'll find it on GitHub: https://github.com/raspberrypilearning/physical-computing-guide/blob/master/pull_...
by ben_nuttall
Mon Mar 20, 2017 5:12 pm
Forum: Python
Topic: GPIOZero and TKinter.
Replies: 2
Views: 445

Re: GPIOZero and TKinter.

Already answered, but yeah, I had a similar issue when importing from both gpiozero and kivvy (both also had "Button"). Python lets you choose whether to import the whole library, namespaced, or import bits of it into the global namespace, for example: from gpiozero import Button btn = Button(17) or...
by ben_nuttall
Sun Mar 19, 2017 1:08 am
Forum: Troubleshooting
Topic: gpiozero
Replies: 6
Views: 638

Re: gpiozero

Oh it looks like you're using Raspbian Wheezy - we upgraded to Raspbian Jessie about 18 months ago: https://www.raspberrypi.org/blog/raspbian-jessie-is-here/ In Wheezy, you had to run your GPIO programs with "sudo", which meant you couldn't execute GPIO commands if you'd opened IDLE from the main me...
by ben_nuttall
Fri Mar 17, 2017 5:55 pm
Forum: Troubleshooting
Topic: gpiozero
Replies: 6
Views: 638

Re: gpiozero

Is your file called "gpiozero.py"? If so, you'll need to call it something else, and make sure there's no gpiozero.py or gpiozero.pyc in the same directory. Is your loop code indented? It isn't in your post but that might just be because you didn't use code tags. I don't think your problem is either...
by ben_nuttall
Wed Mar 15, 2017 2:31 pm
Forum: Raspbian
Topic: gpiozero on lite
Replies: 2
Views: 335

Re: gpiozero on lite

No - Jessie Lite is intended as a minimal server image. It doesn't come bundled with anything other than the basics - everything else is optional.

To install gpiozero on jessie lite:

Code: Select all

sudo apt install python3-gpiozero python3-rpi.gpio python3-pkg-resources -y
by ben_nuttall
Tue Mar 14, 2017 12:13 am
Forum: Automation, sensing and robotics
Topic: Raspberry Pi-der Obstacle avoidance with gpiozero
Replies: 35
Views: 3256

Re: Raspberry Pi-der Obstacle avoidance with gpiozero

front.when_in_range = gobackward while True: goforward() This code will not work like you think. The while loop means it constantly repeats "goforward()". The in_range event does not override this. Something like this might work better: front.when_in_range = gobackward front.when_out_of_range = gof...
by ben_nuttall
Mon Mar 13, 2017 10:17 pm
Forum: Automation, sensing and robotics
Topic: Raspberry Pi-der Obstacle avoidance with gpiozero
Replies: 35
Views: 3256

Re: Raspberry Pi-der Obstacle avoidance with gpiozero

I saw the Robot class and the CamJamEdukit but the Pi-der can't use those as each motor has to 'take turns', if they both run at once the legs kind of 'cancel each other out' or work against each other. I have learnt this through playing about with it in scratch and have found the optimal forward l...
by ben_nuttall
Mon Mar 13, 2017 8:19 pm
Forum: Automation, sensing and robotics
Topic: Raspberry Pi-der Obstacle avoidance with gpiozero
Replies: 35
Views: 3256

Re: Raspberry Pi-der Obstacle avoidance with gpiozero

A few comments: - gpiozero has no need for "GPIO.cleanup()" as it does it automatically when the script ends (and this won't do anything because there's no "GPIO" in scope). - Incidentally, this means that when you're not using a while loop to keep a program running (say, using event callbacks), you...
by ben_nuttall
Fri Mar 10, 2017 2:56 pm
Forum: Raspbian
Topic: Auto starting pigpio from raspi-config
Replies: 1
Views: 849

Re: Auto starting pigpio from raspi-config

The option in raspi-config/rcgui does not run the pigpio daemon. It just allows remote connections when the daemon is running.
by ben_nuttall
Mon Mar 06, 2017 11:11 am
Forum: Python
Topic: Problem Using LED's With Buttons
Replies: 5
Views: 565

Re: Problem Using LED's With Buttons

Try: from gpiozero import LED, Button led = LED(6) button = Button(13) while True: if button.is_pressed: led.on() else: led.off() Read up more at http://gpiozero.readthedocs.io and follow a learning resource at https://www.raspberrypi.org/learning/physical-computing-with-python/
by ben_nuttall
Sun Mar 05, 2017 10:37 am
Forum: Python
Topic: Is pip currently broken in Debain/Raspbian Jessie?
Replies: 8
Views: 1465

Re: Is pip currently broken in Debain/Raspbian Jessie?

Awesome. Thanks Dave. I've had issues with dependency installation before, but only in odd cases. I regularly install ipython with pip on a new Raspbian image and it's never been a problem until now. Like you say, must be a new dependency issue. I'm not sure there's anything we can do about fixing i...
by ben_nuttall
Fri Mar 03, 2017 1:51 pm
Forum: Python
Topic: Is pip currently broken in Debain/Raspbian Jessie?
Replies: 8
Views: 1465

Re: Is pip currently broken in Debain/Raspbian Jessie?

Yes. That fixes it, but it's equivalent to getting pip to update itself.

The problem is that it seems the pip that ships with Raspbian is broken.
by ben_nuttall
Fri Mar 03, 2017 1:25 pm
Forum: Python
Topic: Is pip currently broken in Debain/Raspbian Jessie?
Replies: 8
Views: 1465

Is pip currently broken in Debain/Raspbian Jessie?

I've been having issues with pip the last few days. I don't know what's causing it. (Note all following examples refer to "pip", but I'm referring to both "pip" for Python 2 and "pip3" for Python 3) The apt version of pip in Debian/Raspbian Jessie is 1.5.6 and in Stretch (the next Debian release) is...
by ben_nuttall
Thu Feb 16, 2017 3:57 pm
Forum: Python
Topic: Code question
Replies: 3
Views: 545

Re: Code question

You need to keep the object alive for its state to be maintained. The whole point of having an object is that you create it, then manipulate it, read it, write to it, change its state. If you keep recreating the object inside a loop, you don't maintain state, you throw it away each time and start ag...
by ben_nuttall
Tue Feb 07, 2017 6:57 pm
Forum: Automation, sensing and robotics
Topic: Stepper Motor Help
Replies: 10
Views: 1198

Re: Stepper Motor Help

Thanks for the help, I got my stepper working with gpiozero. Now, what type of motor are they using in this resource: https://www.raspberrypi.org/learning/physical-computing-with-python/motors/ If anyone has a link to a specific recommended model I could purchase, that would be great. The motors us...

Go to advanced search