Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: linga51

GPIO library - WiringPi

[Copy link]

2

Threads

19

Posts

110

Credits

Registered member

Rank: 2

Credits
110
Post time 2016-3-16 04:51:48 From the mobile phone | Show all posts
its like werecatf says you have the gpio sysfs enabled so its not your kernel youre trying the wrong pin!

2

Threads

144

Posts

870

Credits

Senior member

Rank: 4

Credits
870
Post time 2016-3-16 06:59:44 | Show all posts
volkancc replied at 2016-3-16 04:05
can you share os image with us ? i wanna test with ur kernel

There's nothing wrong with the Armbian - kernel, WiringOP should work just fine with it. Did you grab WiringOP from my github or from somewhere else? And are you trying to run the app as root?

1

Threads

12

Posts

47

Credits

Novice

Rank: 1

Credits
47
Post time 2016-3-16 15:08:07 | Show all posts
WereCatf replied at 2016-3-16 06:59
There's nothing wrong with the Armbian - kernel, WiringOP should work just fine with it. Did you g ...

sorry its my problem i select gpio 12 its work !

but i dont understand gpio edge(WiringISR) not work whats wrong ?

2

Threads

144

Posts

870

Credits

Senior member

Rank: 4

Credits
870
Post time 2016-3-16 16:20:39 | Show all posts
volkancc replied at 2016-3-16 15:08
sorry its my problem i select gpio 12 its work !

but i dont understand gpio edge(WiringISR) not w ...

You're not answering my questions.

1

Threads

15

Posts

103

Credits

Registered member

Rank: 2

Credits
103
Post time 2016-3-16 16:58:34 | Show all posts
Edited by StaLeWaR29 at 2016-3-16 13:04

@WereCatf

I used in my code next fix
  1. #define PIN_RPM   7
  2. char clearPinRPM[80];
  3. sprintf (clearPinRPM, "%s %d", "gpio unexport ", PIN_RPM);
  4. system(clearPinRPM);
Copy the Code


anything more cleverly, I could not
it works now

2

Threads

144

Posts

870

Credits

Senior member

Rank: 4

Credits
870
Post time 2016-3-16 18:14:38 | Show all posts
StaLeWaR29 replied at 2016-3-16 16:58
@WereCatf

I used in my code next fix

I don't like unexporting and exporting the pin again as a workaround; it's ugly and clunky. I made a change that, as far as I can tell, should fix the issue. Could you test the latest code from https://github.com/WereCatf/WiringOP and report back?

1

Threads

15

Posts

103

Credits

Registered member

Rank: 2

Credits
103
Post time 2016-3-16 18:39:02 | Show all posts
@WereCatf

I just tested your new code.
It works great !

Thank you for your work!!!

1

Threads

12

Posts

47

Credits

Novice

Rank: 1

Credits
47
Post time 2016-3-16 22:19:11 | Show all posts
WereCatf replied at 2016-3-16 16:20
You're not answering my questions.

yes , i cloned latest source wiringop your repo ,and i recompile succesfully ,
i check the gpio-sunxi module its not loaded
and then i try to compile your wiringisr code on page 7 only i change the button pin 16 to 14
try to run but not interrupted eventcounter

2

Threads

144

Posts

870

Credits

Senior member

Rank: 4

Credits
870
Post time 2016-3-17 01:20:56 | Show all posts
volkancc replied at 2016-3-16 22:19
yes , i cloned latest source wiringop your repo ,and i recompile succesfully ,
i check the gpio-s ...

Are you running the application as root?

2

Threads

144

Posts

870

Credits

Senior member

Rank: 4

Credits
870
Post time 2016-3-17 01:27:55 | Show all posts
Whichever fucking mouth-breathing troglodyte wrote the original WiringOP should be ashamed and ridiculed publicly, the code is a fucking atrocious mess and I keep finding bugs and stupidities there because they couldn't be arsed to do it properly. I just committed another fix, but I'd have to rewrite a whole lot of the code there to fix it all properly. Then there's the issue that WiringPi itself was never designed with non-RPi hardware in mind and has all sorts of stupidities there because of this.

I should just scrap the whole thing and write an alternative to WiringPi that is actually easily extendable to new boards and different pin-setups and interfaces
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-12-11 06:14 GMT+8 , Processed in 0.030052 second(s), 20 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list