Can't Get The Light To Blink!!!

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]

Put your LED to this Pin:

You need GPIO-Module in your Xojo-App.
Then:

#If TargetARM And TargetLinux Then
GPIO.SetupGPIO
GPIO.PinMode(21, GPIO.OUTPUT)
#Else
System.DebugLog “wiringPi library only works on Raspberry Pi”
#Endif
GPIO.DigitalWrite(21, GPIO.On)

Hi Marius,

Thanks for your quick response. The thing is the circuit is working, if I fire of the Python program the light flashes. I’ve also ensured that GPIO module is included in the program and that the WiringPI is up to date add built correctly.

In the mean time I’ve also built the C example and tested it and it too works.

The only problem is the XOJO application.

You know that pin 11 in GPIO.BORD mode is 17 in Xojo, using the BCM mode!?

Nope. That was the import bit I was missing. Thanks.

That was the reason why I asked you to build it like I mentioned on the image :wink: