Go to advanced search

by tom.slick
Mon Jun 20, 2016 6:04 am
Forum: Python
Topic: Need help with controlling relay using multiple DS18B20's
Replies: 4
Views: 1366

Re: Need help with controlling relay using multiple DS18B20'

It would be easier if you used a python package to read your sensors.
https://github.com/timofurrer/w1thermsensor
by tom.slick
Sun Jun 19, 2016 12:54 am
Forum: Python
Topic: import module - Piborg confusion
Replies: 2
Views: 552

Re: import module - Piborg confusion

Put PicoBorgRev.py and UltraBorg.py in the same folder as your script.
or copy both files to /usr/lib/the_installed_version_of_python_that_you_are_using

most likely /usr/lib/python2.7/ or /usr/lib/python3.4
by tom.slick
Fri Jun 17, 2016 2:08 am
Forum: Python
Topic: "Run Module" missing from IDLE menu
Replies: 8
Views: 3007

Re: "Run Module" missing from IDLE menu

OK it's been a while. I still have the issue of IDLEX missing Run Module. I'm on a windows system. There is no purge. Uninstalling and reinstalling doesn't solve the problem. Strangely IDLE still has the Run Module. Contact the author http://ews.illinois.edu/~serwy/ That comes from that IDLEX about...
by tom.slick
Fri Jun 17, 2016 2:04 am
Forum: Python
Topic: Tkinter GUI Freezes - Tips on threading/unblocking GUI?
Replies: 28
Views: 11735

Re: Tkinter GUI Freezes - Tips on threading/unblocking GUI?

I am unsure how to implement somethings i did in my second attempt before your revamped code post. Like the intake fan buttons, i'd like to highlight whatever exhaust fan button was clicked. Thus i know i need to link the current self.ex_bit value to the self.ex#. I tried the following but got noth...
by tom.slick
Wed Jun 15, 2016 10:11 pm
Forum: Python
Topic: Tkinter GUI Freezes - Tips on threading/unblocking GUI?
Replies: 28
Views: 11735

Re: Tkinter GUI Freezes - Tips on threading/unblocking GUI?

Looks like a lot of code, but a lot of it is comments to explain what is happening This only creates a single thread at a time. It was easier to just rewrite what you had then to make a bunch of different examples. If you have any questions let me know. import atexit import sys import signal import ...
by tom.slick
Wed Jun 15, 2016 6:18 pm
Forum: Python
Topic: Tkinter GUI Freezes - Tips on threading/unblocking GUI?
Replies: 28
Views: 11735

Re: Tkinter GUI Freezes - Tips on threading/unblocking GUI?

Just to start with 6 threads and 2 win.after Both functions that call win.after should be combined. And calling READ in a thread is part of the problem as it is also calling win.after And only create threads as you need them. I'll see if I can make you a few examples later this afternoon when I get ...
by tom.slick
Wed Jun 15, 2016 5:56 pm
Forum: Python
Topic: How Do I Stop a Function that is Frozen/Waiting?
Replies: 11
Views: 1670

Re: How Do I Stop a Function that is Frozen/Waiting?

It does run without blocking the GUI as i wanted, but i wonder if i should still implement threading as i add in my other controls? Displaying temp/humidity in the GUI, as well as another set of buttons for fan control. Short answer: No. Just because you learned a new thing does not mean it is the ...
by tom.slick
Tue Jun 14, 2016 11:06 pm
Forum: Python
Topic: How Do I Stop a Function that is Frozen/Waiting?
Replies: 11
Views: 1670

Re: How Do I Stop a Function that is Frozen/Waiting?

If a set amount of time passes you want the pump to turn off If gpio 18 goes LOW you want the pump to turn off And you want the gui to update without blocking All you really need to do is keep track of how much time as passed. Then use tkinters after function to see if that much time has passed then...
by tom.slick
Mon Jun 13, 2016 6:22 pm
Forum: Python
Topic: Tkinter GUI Freezes - Tips on threading/unblocking GUI?
Replies: 28
Views: 11735

Re: Tkinter GUI Freezes - Tips on threading/unblocking GUI?

It looks like you trying to get fans to run at different speeds based on intervals of time on and off (or the result of this). Did you look at using PWM for this? It would change all the logic, but also simplify the code. If your relays are mechanical it's NOT an option (dead relay in time), but if...
by tom.slick
Sun Jun 12, 2016 8:51 pm
Forum: Python
Topic: CANBus Python3 GPIO Error
Replies: 10
Views: 2317

Re: CANBus Python3 GPIO Error

Sorry for the delay. I was very busy last days. I have the 2.7.3 / 3.4.0 versions. Yes, I've installed from source because I was needing the very last version, resolving some compatibility problems between my CAN shields. However, I've managed to resolve this problem by changing the type of the soc...
by tom.slick
Sun Jun 12, 2016 5:32 pm
Forum: Python
Topic: Run Pygame without Starting X?
Replies: 15
Views: 8915

Re: Run Pygame without Starting X?

I guess I should plug a monitor in, learn something new everyday.
by tom.slick
Sun Jun 12, 2016 8:11 am
Forum: Python
Topic: Run Pygame without Starting X?
Replies: 15
Views: 8915

Re: Run Pygame without Starting X?

As long as you do not expect it to still display graphics,
Without X then you do not get graphics. No video, pictures, or line drawing, your get ascii only. Sound and keyboard input should still work, but as for what you see, the terminal is it.
by tom.slick
Sun Jun 12, 2016 8:03 am
Forum: Python
Topic: Tkinter GUI Freezes - Tips on threading/unblocking GUI?
Replies: 28
Views: 11735

Re: Tkinter GUI Freezes - Tips on threading/unblocking GUI?

Tkinter and threading aren't great companions. That is true if Tkinter is running in a thread. But if Tkinter runs a thread it is a different story. Tkinter can get info from a running thread or call a thread to do something unrelated to the gui with out problems. Calling a thread to do something r...
by tom.slick
Sat Jun 11, 2016 7:08 pm
Forum: Python
Topic: Trouble Getting PyAudio 0.2.9
Replies: 12
Views: 5871

Re: Trouble Getting PyAudio 0.2.9

Ok that makes a lot of sense! How would I do that? Is there a resource you can direct me to that will go through the process? And is this where I will find the files I need? https://pypi.python.org/pypi/PyAudio Which file do I want from there if that's the right place? Install portaudio19-dev sudo ...
by tom.slick
Thu Jun 09, 2016 5:10 am
Forum: Python
Topic: FTP transfer when existing file is modified?
Replies: 5
Views: 907

Re: FTP transfer when existing file is modified?

Hello! I'm brand new to Raspberry Pi and thanks to tutorials and these forums, I've managed to get my Pi to take a picture with a USB webcam when a light sensor goes off. Woot! The last thing I want it to be able to do is upload that photo to a website/server whenever it takes a new photo. It's a s...
by tom.slick
Thu Jun 09, 2016 5:00 am
Forum: Python
Topic: need help with a web interface - button wont run script
Replies: 2
Views: 565

Re: need help with a web interface - button wont run script

Look at what you are doing with this line

Code: Select all

exec('/usr/bin/python sudo python /var/www/html/pytest.py');
What does this do when you run it in the terminal?

Code: Select all

/usr/bin/python sudo python /var/www/html/pytest.py
How is it different from this?

Code: Select all

sudo pyhon /var/www/html/pytest.py
by tom.slick
Thu Jun 09, 2016 12:01 am
Forum: Python
Topic: Dropped serial data from pi to arduino?
Replies: 9
Views: 2353

Re: Dropped serial data from pi to arduino?

Just put a 120ohm resistor from 5v to reset on your Arduino.
This will disable the auto reset. Just pull the resistor out and your back to normal.
by tom.slick
Tue Jun 07, 2016 7:19 pm
Forum: Python
Topic: CANBus Python3 GPIO Error
Replies: 10
Views: 2317

Re: CANBus Python3 GPIO Error

Here's a dumb question. How did you install python 3 and what version is installed? Python 2.7.9 and python 3.4.2 are both pre-installed in Raspbian. Okay let me ask the question another way. How did the OP install python? Did they decide that they needed the latest version and install from source ...
by tom.slick
Mon Jun 06, 2016 10:40 pm
Forum: Python
Topic: CANBus Python3 GPIO Error
Replies: 10
Views: 2317

Re: CANBus Python3 GPIO Error

Here's a dumb question.
How did you install python 3 and what version is installed?
by tom.slick
Fri Jun 03, 2016 7:13 pm
Forum: Python
Topic: PyQt4 + GPIO Stacked widget error: exit without error code
Replies: 3
Views: 795

Re: PyQt4 + GPIO Stacked widget error: exit without error co

xangel wrote:The my code is in the zip file.sir
good luck getting someone to down load it.
by tom.slick
Thu Jun 02, 2016 8:53 pm
Forum: Python
Topic: PyQt4 + GPIO Stacked widget error: exit without error code
Replies: 3
Views: 795

Re: PyQt4 + GPIO Stacked widget error: exit without error co

Post the code. Not a link to a zip file.
by tom.slick
Thu Jun 02, 2016 5:58 pm
Forum: Python
Topic: No PYTHONPATH or other environment variables
Replies: 10
Views: 3155

Re: No PYTHONPATH or other environment variables

Are you creating TRUE/FALSE or ON/OFF definitions?

In python TRUE is True and FALSE is False.
And there is no ON/OFF in python or RPi.GPIO.

There is RPi.GPIO.HIGH and RPi.GPIO.LOW
by tom.slick
Mon May 30, 2016 3:22 pm
Forum: Python
Topic: Python can't bind keypress event (using tkinter)
Replies: 3
Views: 2847

Re: Python can't bind keypress event (using tkinter)

Since you don't have any widgets that take text you need to focus_set()

Code: Select all

frame.focus_set()
by tom.slick
Wed May 25, 2016 9:30 am
Forum: Python
Topic: WS2801 Example Script
Replies: 6
Views: 1565

Re: WS2801 Example Script

elParaguayo wrote:
PiDigital wrote:Thanks for the help I will try to PM you guys if I need some more help.
Please keep further questions to the forum so they can help people in the future.
Agreed, please keep further questions to the forum so they can help people in the future.

Go to advanced search