Hi Terry,

So, wiringpi is a C library, there's some example C code for it that
does PWM, and you can build and run that, using sudo, in the shell.
Doing the same, but with your C code, doesn't return to the shell.

> So I installed Geany on the Pi and built my project though it.

That's a text editor come IDE.  (I've just looked it up and it saves
other doing it that are following along at home.  :-)

> If I open Geany via sudo, almost everything is broken

Don't do that.  :)  Quite unusual to run any X Windows program as root.

> if I prefix the Execute incantation in the Geany setup dialog with
> sudo, the terminal that opens says that it cannot find the executable.

It can't find sudo, or your program?  Use /usr/bin/sudo?  Specify the
path to your program?  Do both, i.e. `/usr/bin/sudo
/home/terry/pi/blink'.

> Any ideas?

Debug with printf(3) to the terminal, and continue to use the shell.
Run your non-stopping program from the shell with one of

    sudo strace ./blink
    sudo ltrace ./blink

and see if the output, particularly strace's, gives a clue.  If it
whizzes past too fast then Ctrl-C and work backwards from the end.

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday, 2016-03-01 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to