Python Forum

Full Version: invalid syntax eror
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using the Raspberry PI 3. This is my first program for the PI. When I run the program I keep getting a "Invalid Syntax" error. Below is simple code. Using Python 3.4.2

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)
GPIO.OUTPUT(7,1)
time.sleep (1)
GPIO.OUTPUT(7,0)
time.sleep(1)
GPIO.cleanup()
print ("hello world")
Any help would be appreciated.
try call OUTPUT method in lowercase... GPIO.output().. any differences?
FIXED!!! Thank you so much.
output() definitely should be lowercase. However I don't think it should rise SyntaxError, but AttributeError