So my little box arrived on Saturday morning and I got cracking on setting it up without delay… and by late afternoon all was working like a dream - Screen and File sharing working as expected. As I’ve zero knowledge of electronics I turned to the extras (FreeNove, if it makes any difference) with some excitement and followed their instructions to build the ‘Hello, world’ circuit, ran their little Python program and the blue light starts flashing - Sweet!
So this afternoon I figured getting up and running would no problem… have not seen the little blue light since! I figured it would just be a case of changing the pin number in the XOJO code, but no such look! Then I tried Setup rather than SetupGPIO, various combinations of LOW/HIGH and ON/OFF with no success.
So in desperation I ask what am I missing? Here is the working Python program:
[code]import RPi.GPIO as GPIO
import time
ledPin = 11 # RPI Board pin11
def setup():
GPIO.setmode(GPIO.BOARD) # Numbers GPIOs by physical location
GPIO.setup(ledPin, GPIO.OUT) # Set ledPin’s mode is output
GPIO.output(ledPin, GPIO.LOW) # Set ledPin low to off led
print ‘using pin%d’%ledPin
def loop():
while True:
GPIO.output(ledPin, GPIO.HIGH) # led on
print ‘…led on’
time.sleep(1)
GPIO.output(ledPin, GPIO.LOW) # led off
print ‘led off…’
time.sleep(1)
def destroy():
GPIO.output(ledPin, GPIO.LOW) # led off
GPIO.cleanup() # Release resource
if name == ‘main’: # Program start from here
setup()
try:
loop()
except KeyboardInterrupt: # When ‘Ctrl+C’ is pressed, the child program destroy() will be executed.
destroy()
[/code]