Author: linga51

GPIO library - WiringPi

[Copy link]

2

threads

19

posts

110

credits

Registered member

Rank: 2

credits
110
Published in 2016-3-16 04:51:48 from mobile | Show all floors
its like werecatf says you have the gpio sysfs enabled so its not your kernel youre trying the wrong pin!

2

threads

144

posts

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-3-16 06:59:44 | Show all floors
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
Published in 2016-3-16 15:08:07 | Show all floors
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

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-3-16 16:20:39 | Show all floors
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
Published in 2016-3-16 16:58:34 | Show all floors
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 code


anything more cleverly, I could not
it works now

2

threads

144

posts

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-3-16 18:14:38 | Show all floors
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
Published in 2016-3-16 18:39:02 | Show all floors
@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
Published in 2016-3-16 22:19:11 | Show all floors
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

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-3-17 01:20:56 | Show all floors
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

1104

credits

Gold member

Rank: 6Rank: 6

credits
1104
Published in 2016-3-17 01:27:55 | Show all floors
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 need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list