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

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
12Next
Return to list New
View: 4519|Reply: 18

WiringOP for Orange pi zero

[Copy link]

1

Threads

5

Posts

35

Credits

Novice

Rank: 1

Credits
35
Post time 2017-1-25 20:41:50 | Show all posts |Read mode
Hello,
Is there a WiringOP version for Opi zero.
Or is there a screenshot for the proper mapping.

Thanks

3

Threads

131

Posts

2782

Credits

Gold member

Rank: 6Rank: 6

Credits
2782
Post time 2017-1-25 21:14:28 | Show all posts
Edited by Tina at 2017-1-25 21:20

Hi,
I am not sure but I guess you want the 26 pin GPIO layout. If so you find that here

If you mean by "WiringOP" a version of the OPI zero with 2x13 pins you would have to ask the OPI guys.
I found only this 2x13 pin header on Aliexpress.
Edit:
I also found those 2x40. But I am sure the are cutable

1

Threads

5

Posts

35

Credits

Novice

Rank: 1

Credits
35
 Author| Post time 2017-1-25 21:25:51 | Show all posts
Edited by coscos at 2017-1-25 21:38

Thanks,
I have installed that connector and now want to control the IO s with a library, if possible WiringPi, WiringOp etc. I compile a led blink example for PC PLUS (H3) and able to toogle it by toggling GPIO_0 (wiringOp numbering), interestingly the same app works for Opi zero too (H2).
But I have problems with other GPIO's naming convention etc. And also not sure if my downloaded version of WiringOp(h3) can control SPI or (h2)correctly.

Any tips? Thanks.

1

Threads

5

Posts

35

Credits

Novice

Rank: 1

Credits
35
 Author| Post time 2017-1-25 21:52:12 | Show all posts
Ok I have somewhat figured it out. Pins seem to be mapped properly, I will check further and report back.

So one more question, is it possible to use SPI-CS0 pin as GPIO? (Opi PC or Opi Zero).

1

Threads

7

Posts

55

Credits

Registered member

Rank: 2

Credits
55
Post time 2017-1-31 22:52:12 | Show all posts
Hello,

I also have trouble to find out how to use the gpio in the orange pi zero. Likely I installed the wrong kind of wiringOP. Somewhere i had to choose between an orange pi pc and another orange pi model. there was no tab for choosing the zero. What should I use to program the zero in C language?

Cordially,

Eduard

4

Threads

11

Posts

153

Credits

Registered member

Rank: 2

Credits
153
Post time 2017-2-10 23:04:05 | Show all posts
Is there any solutions?

3

Threads

61

Posts

589

Credits

Senior member

Rank: 4

Credits
589
Post time 2017-2-11 01:49:58 | Show all posts
Hi, I have sucessfully control GPIO on OPi PC, with this library:
https://github.com/zhaolei/WiringOP

It is for H3 SoCs but I bet that it can be used on H2 (OPi zero).

Instructions of installation:
  1. 1 - Get the repo:
  2. git clone https://github.com/zhaolei/WiringOP.git -b h3

  3. 2 - Install it:
  4. cd WiringOP
  5. sudo chmod +x ./build
  6. sudo ./build

  7. 3 - Check the correct installation:
  8. cd ..
  9. gpio readall
Copy the Code


Note: Dont forget the lwiringPi flag when compile a code:
gcc -o blink blink.c -lwiringPi

2

Threads

5

Posts

28

Credits

Novice

Rank: 1

Credits
28
Post time 2017-2-16 21:46:32 | Show all posts
Hi,

I am using git clone https://github.com/zhaolei/WiringOP.git -b h3  to control GPIO on Orange Pi Zero.

It works fine for GPIO 0, 2, 3, 7, 8, 9 But does not work for GPIO 1, 4, 5, 11.

Is it because or wrong mapping ?

8

Threads

184

Posts

1190

Credits

Gold member

Rank: 6Rank: 6

Credits
1190
Post time 2017-2-18 07:43:02 | Show all posts
gailu replied at 2017-2-16 21:46
Hi,

I am using git clone https://github.com/zhaolei/WiringOP.git -b h3  to control GPIO on Orange P ...

No one can reply that you don't exhibit your cord.

2

Threads

5

Posts

28

Credits

Novice

Rank: 1

Credits
28
Post time 2017-2-18 11:31:01 | Show all posts
  1. No one can reply that you don't exhibit your cord.
Copy the Code

Got the difference between OPI PC and OPI Zero mapping. Its working fine now.
12Next
Return to list New
You have to log in before you can reply Login | Register

Points Rules

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

2017-9-23 02:56 GMT+8 , Processed in 0.036777 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list