Go to advanced search

by croston
Thu Apr 18, 2019 9:31 pm
Forum: General programming discussion
Topic: Which is the best way to start working on a c project?
Replies: 2
Views: 114

Re: Which is the best way to start working on a c project?

You could always contribute documentation to get started. Open source projects are more than just code.
by croston
Sat Apr 06, 2019 1:47 pm
Forum: Python
Topic: Unable to install pyzmq and RPi.GPIO from requirements.txt
Replies: 3
Views: 410

Re: Unable to install pyzmq and RPi.GPIO from requirements.txt

The latest version of RPi.GPIO is 0.6.5. The version you are trying to install is 0.5.11, which is four years old. This is not your immediate problem however but it shows just how out of date the project instructions are. Things to try: 1) sudo apt install python3-dev 2) Change requirements.txt to r...
by croston
Fri Apr 05, 2019 6:51 pm
Forum: Troubleshooting
Topic: GUI opening on the server instead of on the client side...
Replies: 14
Views: 263

Re: GUI opening on the server instead of on the client side...

If memory serves me correctly, there is a X11Forwarding flag in /etc/ssh/sshd_config on your Ubuntu box that might need setting to 'yes'.
Restart your ssh server for it to pick up config changes.
by croston
Sun Mar 31, 2019 1:46 pm
Forum: Python
Topic: How to install RPi module for python 3.6
Replies: 4
Views: 152

Re: How to install RPi module for python 3.6

Try:
sudo pip3.6 install RPi.GPIO
by croston
Sun Mar 17, 2019 7:34 pm
Forum: Python
Topic: how to write the sensor data to a .csv file
Replies: 1
Views: 132

Re: how to write the sensor data to a .csv file

You probably want to take a look at Python's csv module:
https://docs.python.org/3/library/csv.html
by croston
Wed Jan 09, 2019 2:33 pm
Forum: Troubleshooting
Topic: Upgrade Python from 3.5.3 to latest version
Replies: 6
Views: 458

Re: Upgrade Python from 3.5.3 to latest version

Sorry - I forgot to add:

Code: Select all

sudo ldconfig
Run that on it's own at a shell prompt and it should work.
by croston
Tue Jan 08, 2019 8:13 pm
Forum: Troubleshooting
Topic: Upgrade Python from 3.5.3 to latest version
Replies: 6
Views: 458

Re: Upgrade Python from 3.5.3 to latest version

You could build it from source. I have blogged about it here:
https://www.wyre-it.co.uk/blog/latestpython/
by croston
Sun Nov 18, 2018 8:45 pm
Forum: General discussion
Topic: Ban from Raspberry Pi forums. [Self-imposed.]
Replies: 33
Views: 1690

Re: Ban from Raspberry Pi forums. [Self-imposed.]

Bear in mind that the purpose of the RPi is for education i.e.teaching children. There will be children reading this forum so comments are (hopefully) moderated with this in mind. DL clearly got it wrong on this basis with his comments and the moderators had to take appropriate action. I hope he'll ...
by croston
Wed Nov 07, 2018 6:31 pm
Forum: General discussion
Topic: How to make interesting projects with the Raspberry pi 3 using the Ada language?
Replies: 7
Views: 410

Re: How to make interesting projects with the Raspberry pi 3 using the Ada language?

If you use 'gnat' (the Ada compiler) then controlling GPIO is as simple as writing to /sys/class/gpio/... using standard file i/o in Ada.
by croston
Sun Nov 04, 2018 4:55 pm
Forum: Beginners
Topic: Exceptions on threading
Replies: 2
Views: 156

Re: Exceptions on threading

It's because you are using GPIO.setmode(...), GPIO.setup(...) and GPIO.cleanup() in your thread. Move these to the beginning and end of your main program.
by croston
Sun Nov 04, 2018 1:15 pm
Forum: Troubleshooting
Topic: [SOLVED] gpiozero Button - Runtime Error - edge detection
Replies: 19
Views: 1809

Re: gpiozero Button - Runtime Error - edge detection

neilgl wrote:
Sun Nov 04, 2018 12:56 pm
The GPIO.VERSION now shown is 0.6.4 - should it be that?
That's what it will report on the development version because I haven't changed it to report anything else yet.
by croston
Sat Nov 03, 2018 10:49 pm
Forum: Troubleshooting
Topic: cannot install rpi.gpio on raspbian lite stretch
Replies: 2
Views: 313

Re: cannot install rpi.gpio on raspbian lite stretch

You have installed the debug package by accident. To remove it:

Code: Select all

$ sudo apt-get remove 
python-rpi.gpio-dbgsym python3-rpi.gpio-dbgsym
by croston
Sat Nov 03, 2018 9:13 pm
Forum: Troubleshooting
Topic: [SOLVED] gpiozero Button - Runtime Error - edge detection
Replies: 19
Views: 1809

Re: gpiozero Button - Runtime Error - edge detection

I think I've fixed it in the latest development RPi.GPIO. It turns out that the GPIOs weren't getting cleaned up properly under Thonny and a recent bugfix to RPi.GPIO unmasked the problem. I will release RPi.GPIO 0.6.5 in the next few days. If you can't wait that long then install the latest develop...
by croston
Sat Nov 03, 2018 5:10 pm
Forum: Troubleshooting
Topic: [SOLVED] gpiozero Button - Runtime Error - edge detection
Replies: 19
Views: 1809

Re: gpiozero Button - Runtime Error - edge detection

Ive managed to reproduce the problem with Thonny now. How are you stopping your code from running?
by croston
Sat Nov 03, 2018 3:58 pm
Forum: Troubleshooting
Topic: [SOLVED] gpiozero Button - Runtime Error - edge detection
Replies: 19
Views: 1809

Re: gpiozero Button - Runtime Error - edge detection

I've been trying all week to reproduce this problem - no luck so far.
by croston
Thu Nov 01, 2018 1:54 pm
Forum: Troubleshooting
Topic: GPIO Python Script Restart: Failed to add edge detection
Replies: 3
Views: 575

Re: GPIO Python Script Restart: Failed to add edge detection

I'm aware of this problem and working on a fix.
by croston
Tue Feb 06, 2018 8:25 pm
Forum: General discussion
Topic: What's wrong with my sqlite-python code?
Replies: 5
Views: 523

Re: What's wrong with my sqlite-python code?

The last two lines of code:

Code: Select all

conn.commit
conn.close
are missing brackets therefore it does not call these functions.

In others words it should be:

Code: Select all

conn.commit()
conn.close()
by croston
Sat Jan 06, 2018 6:50 pm
Forum: Beginners
Topic: Print raw data to label printer from python2 not working as expected.
Replies: 6
Views: 1474

Re: Print raw data to label printer from python2 not working as expected.

I am the author of the zebra Python module: https://pypi.python.org/pypi/zebra/ It is basic and only uses EPL2, not ZPL but I think it would be useful for you to look at the code to see how it works. Source is at https://www.wyre-it.co.uk/hg/zebra/file/tip/zebra.py I haven't touched it in nearly thr...
by croston
Fri Nov 10, 2017 12:43 pm
Forum: Python
Topic: idle in virtual environment
Replies: 6
Views: 2177

Re: idle in virtual environment

BTW, I was also misinformed by SO, It says to use pip3 install RPi.GPIO, actually, I used pip install RPi.GPIO in the virtual environment than it works. However I am not very clear on this, isn't pip is only for python 2 and pip3 is for python3? When creating a python virtual environment, you are s...
by croston
Mon Nov 06, 2017 12:36 pm
Forum: Python
Topic: Building RPi.GPIO module
Replies: 1
Views: 415

Re: Building RPi.GPIO module

If you have built Python 3.6 from source then it is as simple as :

Code: Select all

# pip3 install RPi.GPIO
Note that edge detection will probably not work as it depends on /sys/class/* provided by the Linux kernel.

I don't know FreeBSD at all. Does it provide /dev/mem? RPi.GPIO needs this too.
by croston
Sun Nov 05, 2017 10:16 am
Forum: Weather station
Topic: Help with python scratch module
Replies: 13
Views: 2829

Re: Help with python scratch module

I am the author of the 'scratch' python module. It is currently released as an alpha release. This means that you need to add the --pre flag to install it with pip. I did the release over five years ago now so I think it is long overdue in changing from alpha to production status! My apologies to e...
by croston
Sun Sep 24, 2017 10:10 am
Forum: Weather station
Topic: Troubles installing Stretched Raspbian
Replies: 29
Views: 3771

Re: Troubles installing Stretched Raspbian

Obligatory XKCD:
https://xkcd.com/149/

Go to advanced search