I am a Python newbie. I am following a tutorial to run an SPI 1.8" TFT display. A term (or is it a module?)
InitIO() is defined as follows:
def InitIO(): GPIO.setmode(GPIO,BOARD) GPIO.setwarnings(false) for pin in pins: GPIO.setup(pin,GPIO.OUT) GPIO.output(SCLK,0) #start with clock low
I understand the purpose of the module as follows: It sets up three GPIO pins as SPI clock, data and data command. However, when
InitIO() is called it produces an error:
NameError: name 'BOARD' is not defined
There is no mention in the tutorial about identifying BOARD. I have also tried substituting BCM instead of BOARD and I get the same error, with BCM substituted for BOARD in the error.
Any ideas on where I've gone wrong would be appreciated.