Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4049

Python • Re: Script for waveshare relay module

$
0
0
I would appreciate any help to get this script to work. I have a feeling it is not right? B.Goode !

Your own Python interpreter will be the final arbiter, not me.

But I would expect there to be multiple issues arising from this line -

Code:

GPIO.setup(relay_ch1,2,3, GPIO.OUT)

There may be other problems - I stopped looking after finding that one.



The documentation you may need for operating on a list of channels is here -
Ref: https://sourceforge.net/p/raspberry-gpi ... asicUsage/
Setup more than one channel
You can set up more than one channel per call (release 0.5.8 onwards). For example:

chan_list = [11,12] # add as many channels as you want!
# you can tuples instead i.e.:
# chan_list = (11,12)
GPIO.setup(chan_list, GPIO.OUT)

Statistics: Posted by B.Goode — Fri Jun 28, 2024 8:51 am



Viewing all articles
Browse latest Browse all 4049

Trending Articles