Go to advanced search

by RubePi
Tue Nov 01, 2016 4:17 am
Forum: Python
Topic: linux/raspberian or IDLE can't find tkinter???
Replies: 5
Views: 1216

Re: linux/raspberian or IDLE can't find tkinter???

I do the "from tkinter import * " and it's worked for years. now I get " no such module" error. do I have to re-NOOB this thing?
by RubePi
Thu Oct 27, 2016 5:30 am
Forum: Python
Topic: need a loop
Replies: 2
Views: 669

Re: need a loop

I agree with scotty -- most of your ##s could be def (functions) then your main pgm would be a couple of lines in a main loop. you could then add all kinds of control functions to it.
by RubePi
Thu Oct 27, 2016 5:12 am
Forum: Python
Topic: Need help with If Function in script
Replies: 3
Views: 919

Re: Need help with If Function in script

not an expert, but there is a function - keypresed() and I think if you pass (x) or a <ctrl> x you can use it to stop.
research - it's how you learn. ( ie. if keypressed(x): stop routine
by RubePi
Thu Oct 27, 2016 3:57 am
Forum: Python
Topic: linux/raspberian or IDLE can't find tkinter???
Replies: 5
Views: 1216

linux/raspberian or IDLE can't find tkinter???

didn't change a thing - now IDLE nor terminal can't find tkinter.
running ras pi 2, python 3.2.1, on resbian linux. tkinter is in the /usr/lib/ dir, but suddenly it can't find it. where is the import path config? WTF??
by RubePi
Thu Sep 22, 2016 5:10 am
Forum: Automation, sensing and robotics
Topic: Display for Python PLC
Replies: 2
Views: 1095

Re: Display for Python PLC

Thanx Scotty -- tried .after - worked once, but didn't start the motors. Look, I don't want to take up your time, but I'm so close--- lemme know if I should just RTFM !!!! the PLC is 4 modules (files): sensors, motorcontrol, autoControl and a database that ties them all together. The modules don't c...
by RubePi
Wed Sep 21, 2016 3:55 am
Forum: Automation, sensing and robotics
Topic: Display for Python PLC
Replies: 2
Views: 1095

Display for Python PLC

I'm working on a PLC for model of a production line. The auto control is done, manual is a tkinter module. I need a simple display for the sensors & motor status'. I'm trying tkinter, but it won't display without the event loop, which of course takes control away from the PLC. I haven't started the ...
by RubePi
Mon May 02, 2016 3:26 am
Forum: Python
Topic: i2c multiplexer help? - TCA9548A
Replies: 11
Views: 12582

Re: i2c multiplexer help? - TCA9548A

well, I'm kind of a noob myself and was having trouble writing to regs in the Adafruit SCA9685 16 ch i2c PWM driver. I downloded the data sheet and eventually found the data regs and what they want. Compared these to some code that worked, put 2&2 together and got 3. I can now direct write to the re...
by RubePi
Sat Apr 30, 2016 4:34 am
Forum: Other projects
Topic: Turn Raspberry Pi into a P.L.C (Programable Logic Controller) Advanced
Replies: 225
Views: 256439

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Ok, Nubie alert. (kinda long) Got the pi2 in Jan. Was working at a bottling plant - operator. Understand programming (hacking around abt 35 yrs) >>The deal: I am building a working model of a plant with motor controls (Ada 16 i2c pwm pca9685 board), PEs PRX switches, counters, timers et.al. (basical...
by RubePi
Thu Apr 28, 2016 5:08 am
Forum: Python
Topic: referenced before assignment?????
Replies: 3
Views: 2432

Re: referenced before assignment?????

Thank you sooo. much. I tried the one at the top, but it was the global in the function that did it.
by RubePi
Thu Apr 28, 2016 4:35 am
Forum: Python
Topic: referenced before assignment?????
Replies: 3
Views: 2432

referenced before assignment?????

My head is bleeding from banging on this one. UnboundLocalError: local variable 'mSpeed' referenced before assignment ??? Where do I assign mSpeed ??? I've tried all over - top of root Frame,as a global at the top (as it is now). the only place it's worked is at the top of the changeSpeed function, ...
by RubePi
Thu Apr 28, 2016 4:21 am
Forum: Python
Topic: Motor start and stop logic and programming help
Replies: 1
Views: 437

Re: Motor start and stop logic and programming help

didn't see any library imports i.e.: #Import Libraries import RPi.GPIO as GPIO GPIO.setmode (GPIO.BCM) GPIO.setwarnings(False) #some of the pins have other functions, this tells pi to ignore them. import time (probably handled by the Adruino) with RPi.GPIO library there is a cleanup() method :: #Cle...
by RubePi
Sat Apr 02, 2016 8:55 am
Forum: Automation, sensing and robotics
Topic: Glass Bottle counter sensor on conver belt query!!
Replies: 3
Views: 2058

Re: Glass Bottle counter sensor on conver belt query!!

I worked at an Orange Juice bottling plant for a while. We used IR prox sensors that hit a reflector and triggered a HI / Low which was sent back to the PLC. I am currently working on a model (rube goldberg machine) to mimic that system, and take to vocational schools to show how such a system works...
by RubePi
Sat Apr 02, 2016 3:07 am
Forum: Automation, sensing and robotics
Topic: The easiest way to control a dc motor?
Replies: 2
Views: 709

Re: The easiest way to control a dc motor?

My girlfriend uses a simple gravity feeder when she goes out of town. You could add a vibration motor (see adafruit.com) to the bottom of this. you need a motor, a battery pack or plug-in charger and a switch, perhaps on a timer. the switch is the tricky part. The power supply (battery pack) has a +...
by RubePi
Fri Apr 01, 2016 4:59 am
Forum: Python
Topic: python3-smbus
Replies: 20
Views: 31608

Re: python3-smbus

Thank you soooo much ShiftPlusOne and you others for bringing this up. I've been banging my head on this for weeks.
Now it works. I'm a nubie @Pi and python, and need i2c for my project. -- thanx agn!
p.s. this is what got me to register - something I don't often do.)

Go to advanced search