Go to advanced search

by noiling
Sat Feb 03, 2018 10:11 am
Forum: Beginners
Topic: problem with gpio
Replies: 10
Views: 1085

Re: problem with gpio

coding seems not to be the problem because another script (i did really code on my own) that works is import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(4, GPIO.OUT) GPIO.setup(17, GPIO.OUT) print ("hallo") for n in range(10): print (n) GPIO.outp...
by noiling
Sat Feb 03, 2018 10:08 am
Forum: Beginners
Topic: problem with gpio
Replies: 10
Views: 1085

Re: problem with gpio

ok thanks now ive got the problem i dont understand what exaktly to import!!! here is my skript import Tkinter from Tkinter import* import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(4, GPIO.Out) def anzeige(lb): if GPIO.input(4): lb.config(text="GPIO 4 hig...
by noiling
Sat Feb 03, 2018 4:34 am
Forum: Beginners
Topic: problem with gpio
Replies: 10
Views: 1085

Re: problem with gpio

thanks
i did right

now ive got the problem want to save my program
and later edit it
but if i save and open it then there arn the

>>>

in the next line
by noiling
Fri Feb 02, 2018 7:20 pm
Forum: Beginners
Topic: problem with gpio
Replies: 10
Views: 1085

problem with gpio

in python i always get
i have a raspberry 3

>>> GPIO.setmode(GPIO.BCM)

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
GPIO.setmode(GPIO.BCM)
NameError: name 'GPIO' is not defined

Go to advanced search