Yesterday I got my brand new RasPi 3 model B. The package included a full GPIO equipment. After few minutes I was ready to launch everything and it works wonderfully, except for one strange behaviour: I wanted to play around with GPIO, I set everything up (Hardware & Updates/Upgrades) and wrote a simple Python script:
#!/usr/bis/python
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.Setup(17,GPIO.OUT)
GPIO.Setup(6,GPIO.OUT)
Print ("Test")
GPIO.Output(17,GPIO.HIGH)
GPIO.Output(6,GPIO.HIGH)
GPIO.cleanup()
When I run it I get following Error:
pi@Raspi2:~ $ sudo python test.py
Traceback (most recent call last):
File "test.py", line 4, in <module>
GPIO.Setup(17,GPIO.OUT)
AttributeError: 'module' object has no attribute 'Setup'
When I manually type it into python console, everything works fine. Can somebody explain why this happens?
#!/usr/bin/python
,bin
notbis
.