* * *

Author Topic: Problem running example on Raspberry PI  (Read 719 times)

MartynA

  • New member
  • *
  • Posts: 17
Re: Problem running example on Raspberry PI
« Reply #15 on: December 07, 2017, 06:35:34 pm »
I've been using the "fix" in an app I've been writing for my son for a couple of days, and it seems to work fine.

Presumably, rather than use a specific value for the Sleep period, it would be preferable to use a while loop to return a zero status or timeout.

Btw, meanwhile I've found a problem in another example in the http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi#PiGpio_Low-level_native_pascal_unit_.28GPIO_control_instead_of_wiringPi_c_library.29 page - I'll start a new thread about that.

Cheers, Martyn

rvk

  • Hero Member
  • *****
  • Posts: 2974
Re: Problem running example on Raspberry PI
« Reply #16 on: December 07, 2017, 07:36:40 pm »
Good to know a small delay works. The delay can probably be even smaller.

But checking for the existence of the gpio17 in a loop won't work 100% either.
Because the directory is first created with limited permissions.
After that the permissions are changed.

So actually, the wait should be for the correct permissions on the direction file.
Some info: https://github.com/raspberrypi/linux/issues/553

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus