Hello, all.
I have a function that takes three arguments, arguments to express an RGB
colour. The function controls an LED light strip (a Blinkytape).
Sometimes I might need to be change what colour is sent to the function,
so I set a variable with the idea that I can change just the variab
Brendan and Alister, thank you both for responding.
I am very inexperienced with python, but not new to computers so on my
own I realized the strings vs number mistake. (I seem to work with and
learn about Python for a few weeks at a time with 6 to 12 months in
between. Need to change that a
Good day, all.
I need help using the Python bindings for GPSD. Specifically, I would
like to take a latitude reading, put it in a variable and use it later.
The problem is that every example I see involves constantly taking
changing readings. That part I have working for myself by following
Hello.
Very new to Python and looking for some basic help.
Would like a set-up where something happens when a key is pressed. Not
propose a question, have the user type something, then hit return, then
something happens, but just the R key is pressed, something happens, then
something else
Laura and Gary, thank you for your replies. I have three physical
buttons connected to a Kade device emulating a keyboard. These buttons
control an LED light strip. So there is no screen, so a GUI did not cross
my mind. I thought it made sense as it is easily done by other scripting
languages
from Tkinter import *
from blinkstick import blinkstick
led = blinkstick.find_first()
timered = 0
timeyellow = 0
timeblue = 0
colour = None
root = Tk()
root.title('eFlag 1')
def red1(event):
colour = 1
def yellow1(event):
colour = 2
def blue1(event):
colour = 3
root.bind_all(
Thank to the others who joined in and posted replies.
Michael, your assumption is correct. To quote my original post, "and I
want this working on a Raspberry Pi." Doing a superficial look at curses
and getch it looks excessively complicated. I was under the impression it
was not multi-platfo
It appears that one of my posts was cut off. It contains my script but
none of the lengthy text in front of it.
To summarize, my set-up consists of three "massive arcade buttons" from
Adafruit. one red, one blue, one yellow. They are connected to a Kade
Device that is connected to a Raspberr
That was the impression I got reading some comments people made online
and doing research, so I focused on tkinter. As I mentioned in the 4th
sentence of the post you quoted I discovered that was not the case, but
by then I had already done some work on the tkinter script so I kept with
it.
Christian, are you suggesting I learn to do everything perfectly before
I ask how to do everything perfectly?
Despite your tone and insults I honestly appreciate the response. I know
what to focus on and less than 5 minutes from now I will be looking for e-
books on the specific subjects you
Guys, thanks for the various code examples for GPIO and the warning
about debouncing issues. I am still considering going the route of more
complex wiring and doing it a more traditional GPIO way.
--
https://mail.python.org/mailman/listinfo/python-list
Hello, all.
Thanks to everyone who responded to my post.
I decided to make sure I had something that worked with what I have now
and used Curses to finish it. However, it turns out that the extra work
and problems with using GPIO pins and wiring up controllers that way is a
small amount of
Hello, all. I am hoping some people here are familiar with the RPi.GPIO
python module for the Raspberry Pi.
Very new to Python and electronics. Not to computing in general though.
I posted for help about accepting key presses and then discovered that
wiring up buttons directly to the Pi was
Thanks again to everyone who tried to help.
Michael, I especially appreciate your encouragement and chiming in to
point out that telling newbies to learn everything there is before
posting question was not helpful in getting more people using Python.
Have the Pi wired up directly to the but
Thanks for the reply. Also, thanks to Laura who replied via email.
Tried a bunch of things based off these comments and I always ended up
with one of two situations, the channel conflict error, or an instant run
and quit issue. This new version of the code runs but is unresponsive. I
removed
Thanks for the replies, everyone.
Two of you suggested I ask in comp.sys.raspberry-pi. We leave in a world
where people cannot tell you the difference between the world wide web
and the Internet and tech support for my ISP once told me in response to
mentioning that thei news server was not
Dennis, Hakugin, I tried your scripts and had to alter a typo here or
there, but once the basic errors disappeared I had the same error
message. "Conflicting edge detection already enabled for this GPIO
channel".
As much as I despise web based bulletin board systems I registered on
the Rasp
Hakugin: Thanks for the correction. Someone elsewhere showed me example
code that was very close to yours, with that being the main difference.
His gave an error message that red_button was undefined so I moved the
code block below the callbacks. After that it ran without producing
errors but
Hello.
As per the suggestion of two of you I went to the Raspberry Pi
newsgroup. Dennis is also there and has been posting in response to my
problems. Between there and the Raspberry Foundation website I discovered
that my wiring did not match my code and changed all PUD_DOWN to PUD_UP
and
MRAB:
Thanks for replying. I got so hyper focused on solving my hardware
problems, and excited that I did, that I forgot details from previous
comments. Thanks for your post.
Off to make things global...
--
https://mail.python.org/mailman/listinfo/python-list
Hello.
Thanks to the help of people here and in other newsgroups I seem to have
something working doing the basics. (Buttons work, colours light up
appropriately.)
When I followed MRAB's instructions and read about scopes of variables
that solved my most recent problem, but it introduced a
Hello, there.
MRAB, thank you for teaching me proper Python syntax for how I tried to
use the or operator.
Dennis, I must have learned allot recently as I believe I understood 99%
of that code. I see how it is not just more advanced, but actually better
than what I had. However, line 47 (c
22 matches
Mail list logo