Author: Buddy

WiringPi on OrangePi 2G-IOT[Beta]

[Copy link]

0

threads

7

posts

65

credits

Registered member

Rank: 2

credits
65
Published in 2017-6-25 11:47:39 | Show all floors
Edited by yoelmend at 2017-6-27 20:52

thanks for answering

4

threads

38

posts

337

credits

Intermediate member

Rank: 3Rank: 3

credits
337
Published in 2017-6-29 22:13:38 | Show all floors
Hi,
I'm trying setting up a rs485 on UART2 (PA13 and PA14) and I need a one more gpio to select direction. As I've a custom PCB, I need to use PA1 pin for that, but seems PA1 is blocked for UART1.
How I can change PA1 pin functionality? script.bin file on /boot doesn't exists. My kernel is Linux OrangePI 3.10.62-rel5.0.2 #54 PREEMPT Mon Jun 5 16:46:56 CST 2017 armv7l GNU/Linux

Thanks

0

threads

7

posts

65

credits

Registered member

Rank: 2

credits
65
Published in 2017-7-4 12:29:23 | Show all floors
Edited by yoelmend at 2017-7-4 12:31
crossmax replied at 2017-6-29 22:13
Hi,
I'm trying setting up a rs485 on UART2 (PA13 and PA14) and I need a one more gpio to select dire ...

Hello,
  In this way I have managed to work 7 gpio as inputs and outputs from gpio0 ..... gpio6. regards

-------------------------------->>>>>>>>>>>>>>>>>http://comohacer.eu/gpio-raspberry-pi/

0

threads

1

posts

10

credits

Novice

Rank: 1

credits
10
Published in 2017-8-15 14:50:46 | Show all floors
yoelmend replied at 2017-6-22 11:37
Hi, I'm doing the blink.c test, compile but the LED does not blink, any ideas?

#include

WiringPi on OrangePi 2G-IOT not work!
Only PIN 1 (B5 GPIO 37) is turned on and off !!!


  1. root@OrangePi:~/WiringPi/examples# ./blink8
  2. Raspberry Pi - 8-LED Sequencer
  3. ==============================

  4. Connect LEDs to the first 8 GPIO pins and watch ...
  5. ERROR: can't operate GPIOC-25
  6. ERROR: can't operate GPIOC-6
  7. ERROR: can't operate GPIOC-5
  8. ERROR: can't operate GPIOC-25
  9. ERROR: can't operate GPIOC-6
  10. ERROR: can't operate GPIOC-5

  11. ----------------------------------
  12. ----------------------------------
  13. ---------------------------------
Copy code
  1. root@OrangePi:~# gpio readall
  2. +-----+-----+----------+------+---+-Orange Pi 2G-IOT+---+---+------+---------+-----+--+
  3. | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
  4. +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
  5. |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
  6. |  62 |   8 |    SDA.0 |   IN | 0 |  3 || 4  |   |      | 5V       |     |     |
  7. |  63 |   9 |    SCL.0 |   IN | 0 |  5 || 6  |   |      | 0v       |     |     |
  8. |  56 |   7 |   GPIO.7 | ALT4 | 0 |  7 || 8  | 0 | IN   | TxD2     | 15  | 72  |
  9. |     |     |       0v |      |   |  9 || 10 | 0 | IN   | RxD2     | 16  | 71  |
  10. |  70 |   0 |     RxD1 |   IN | 0 | 11 || 12 | 0 | ALT4 | GPIO.1   | 1   | 37  |
  11. |  14 |   2 |     TxD1 | ALT2 | 0 | 13 || 14 |   |      | 0v       |     |     |
  12. |  15 |   3 |     CTS1 | ALT4 | 0 | 15 || 16 | 0 | IN   | GPIO.4   | 4   | 69  |
  13. |     |     |     3.3v |      |   | 17 || 18 | 0 | IN   | GPIO.5   | 5   | 89  |
  14. |   4 |  12 |  SPI2_DI | ALT2 | 1 | 19 || 20 |   |      | 0v       |     |     |
  15. |   3 |  13 | SPI2_DIO | ALT1 | 1 | 21 || 22 | 0 | ALT3 | RTS1     | 6   | 16  |
  16. |   2 |  14 | SPI2_CLK | ALT2 | 1 | 23 || 24 | 1 | ALT4 | SPI2_CS0 | 10  | 5   |
  17. |     |     |       0v |      |   | 25 || 26 | 1 | ALT3 | SPI2_CS1 | 11  | 6   |
  18. |   1 |  30 |    SDA.1 |   IN | 1 | 27 || 28 | 1 | ALT4 | SCL.1    | 31  | 0   |
  19. |  90 |  21 |  GPIO.21 |   IN | 0 | 29 || 30 |   |      | 0v       |     |     |
  20. |  91 |  22 |  GPIO.22 |   IN | 0 | 31 || 32 | 0 | ALT3 | RTS2     | 26  | 41  |
  21. |  92 |  23 |  GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v       |     |     |
  22. |  93 |  24 |  GPIO.24 |   IN | 0 | 35 || 36 | 0 | ALT3 | CTS2     | 27  | 40  |
  23. |  94 |  25 |  GPIO.25 |   IN | 0 | 37 || 38 | 1 | IN   | SCL.2    | 28  | 38  |
  24. |     |     |       0v |      |   | 39 || 40 | 1 | IN   | SDA.2    | 29  | 39  |
  25. +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
  26. | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
  27. +-----+-----+----------+------+---+-Orange Pi 2G-IOT+---+------+----------+-----+-----+
  28. root@OrangePi:~# gpio mode 4 out
  29. root@OrangePi:~# gpio write 4 0
  30. ERROR: can't operate GPIOC-5
  31. root@OrangePi:~# gpio write 4 1
  32. ERROR: can't operate GPIOC-5
  33. root@OrangePi:~# gpio readall
  34. +-----+-----+----------+------+---+-Orange Pi 2G-IOT+---+---+------+---------+-----+--+
  35. | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
  36. +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
  37. |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
  38. |  62 |   8 |    SDA.0 |   IN | 0 |  3 || 4  |   |      | 5V       |     |     |
  39. |  63 |   9 |    SCL.0 |   IN | 0 |  5 || 6  |   |      | 0v       |     |     |
  40. |  56 |   7 |   GPIO.7 | ALT4 | 0 |  7 || 8  | 0 | IN   | TxD2     | 15  | 72  |
  41. |     |     |       0v |      |   |  9 || 10 | 0 | IN   | RxD2     | 16  | 71  |
  42. |  70 |   0 |     RxD1 |   IN | 0 | 11 || 12 | 0 | ALT4 | GPIO.1   | 1   | 37  |
  43. |  14 |   2 |     TxD1 | ALT2 | 0 | 13 || 14 |   |      | 0v       |     |     |
  44. |  15 |   3 |     CTS1 | ALT4 | 0 | 15 || 16 | 0 | IN   | GPIO.4   | 4   | 69  |
  45. |     |     |     3.3v |      |   | 17 || 18 | 0 | IN   | GPIO.5   | 5   | 89  |
  46. |   4 |  12 |  SPI2_DI | ALT2 | 1 | 19 || 20 |   |      | 0v       |     |     |
  47. |   3 |  13 | SPI2_DIO | ALT1 | 1 | 21 || 22 | 0 | ALT3 | RTS1     | 6   | 16  |
  48. |   2 |  14 | SPI2_CLK | ALT2 | 1 | 23 || 24 | 1 | ALT4 | SPI2_CS0 | 10  | 5   |
  49. |     |     |       0v |      |   | 25 || 26 | 1 | ALT3 | SPI2_CS1 | 11  | 6   |
  50. |   1 |  30 |    SDA.1 |   IN | 1 | 27 || 28 | 1 | ALT4 | SCL.1    | 31  | 0   |
  51. |  90 |  21 |  GPIO.21 |   IN | 0 | 29 || 30 |   |      | 0v       |     |     |
  52. |  91 |  22 |  GPIO.22 |   IN | 0 | 31 || 32 | 0 | ALT3 | RTS2     | 26  | 41  |
  53. |  92 |  23 |  GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v       |     |     |
  54. |  93 |  24 |  GPIO.24 |   IN | 0 | 35 || 36 | 0 | ALT3 | CTS2     | 27  | 40  |
  55. |  94 |  25 |  GPIO.25 |   IN | 0 | 37 || 38 | 1 | IN   | SCL.2    | 28  | 38  |
  56. |     |     |       0v |      |   | 39 || 40 | 1 | IN   | SDA.2    | 29  | 39  |
  57. +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
  58. | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
  59. +-----+-----+----------+------+---+-Orange Pi 2G-IOT+---+------+----------+-----+-----+
  60. root@OrangePi:~#
Copy code


6

threads

70

posts

370

credits

Intermediate member

Rank: 3Rank: 3

credits
370
Published in 2017-8-17 13:32:30 from mobile | Show all floors
This board its abandonated

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-9-5 23:44:03 | Show all floors
Edited by nopnop2002 at 2017-9-5 23:48
Buddy replied at 2017-6-21 20:33
Hi friends:
   I have fix this problem, please update newest source code from github.

Please tell me which boot image to use to work WiringPi.

1

threads

9

posts

79

credits

Registered member

Rank: 2

credits
79
Published in 2017-9-12 21:06:07 | Show all floors
Edited by Gosha at 2017-9-12 21:36

This Ubuntu Server image from download page should work fine

http://www.orangepi.org/download ... 3aa11652927416.html

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-9-12 21:42:43 | Show all floors
@Gosha
Thnak you.

3

threads

19

posts

87

credits

Registered member

Rank: 2

credits
87
Published in 2017-9-14 18:03:06 from mobile | Show all floors
Have anyone got to blink a simple LED through python or C using the god damn WiringPi library?

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-9-14 21:24:12 | Show all floors
Edited by nopnop2002 at 2017-9-14 21:33
LucasBSC replied at 2017-9-14 18:03
Have anyone got to blink a simple LED through python or C using the god damn WiringPi library?

I gave up using WiringPi for 2g-iot library.
python-periphery library works very well.

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list