Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4863

Beginners • Re: Rpi 5 and Pan Tilt hat

$
0
0
I fixed the export!!!!

the original github of zeroping/sysfspwm wasn't working because he forget that after an export you need to wait for the pwm to popup on folder.

I just add a small delay of 100ms after each export and it works now!.

Maybe I should loop until it pop up but looks like a delay of 100ms was good enough!

my github updated!

I will post a request to zeroping about the two bugs I found on his github.
Great! Will test it now. Got an idea how to improve wait condition:
while(true)
{
if(QDir().exitsts("path to dir"))
break;
}

Actually we don`t know how many time we will wait until something will be created. Maybe device will busy much longer than we suppose.
But here is the lack of path to dir we are waiting for. I tried
jryba@raspberrypi:~ $ cd /sys/class/pwm/pwmchip6
jryba@raspberrypi:/sys/class/pwm/pwmchip6 $ echo 0 > export
but i didn`t find any new folders in /sys/class/pwm/pwmchip6 folder. Can you give an idea what should be created to check it existance?

Statistics: Posted by jryba — Sun Mar 17, 2024 8:17 pm



Viewing all articles
Browse latest Browse all 4863

Trending Articles