0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

NanoPi NEO CoreにWiringNPを入れる

Last updated at Posted at 2018-01-08

手元の環境でデフォルトで入ってるWiringNPは、gpioがエラー吐くのでソースから。
friendlyarmのだとコンパイル/インストールができなかったのでwertyzpのをビルドした。

git clone https://github.com/wertyzp/WiringNP.git
cd WiringNP/
chmod 755 build
./build

実行結果

pi@NanoPi-NEO-Core:~$ gpio readall
 +-----+-----+----------+------+---+-NanoPI M1+---+------+----------+-----+-----+
 |  H3 | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi |  H3 |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
 |  12 |   8 |    SDA.0 | ALT5 | 0 |  3 || 4  |   |      | 5v       |     |     |
 |  11 |   9 |    SCL.0 | ALT5 | 0 |  5 || 6  |   |      | 0v       |     |     |
 | 203 |   7 |   GPIO.7 |  OFF | 0 |  7 || 8  | 0 | ALT5 | TxD1     | 15  | 198 |
 |     |     |       0v |      |   |  9 || 10 | 0 | ALT5 | RxD1     | 16  | 199 |
 |   0 |   0 |     TxD2 | ALT5 | 0 | 11 || 12 | 0 | OUT  | GPIO.1   | 1   | 6   |
 |   2 |   2 |     RTS2 |  OFF | 0 | 13 || 14 |   |      | 0v       |     |     |
 |   3 |   3 |     CTS2 |  OFF | 0 | 15 || 16 | 0 | OFF  | RTS1     | 4   | 200 |
 |     |     |     3.3v |      |   | 17 || 18 | 0 | OFF  | CTS1     | 5   | 201 |
 |  64 |  12 |     MOSI | ALT4 | 0 | 19 || 20 |   |      | 0v       |     |     |
 |  65 |  13 |     MISO | ALT4 | 0 | 21 || 22 | 0 | ALT5 | RxD2     | 6   | 1   |
 |  66 |  14 |     SCLK | ALT4 | 0 | 23 || 24 | 1 | OUT  | SPI0_CS  | 10  | 67  |
 |     |     |       0v |      |   | 25 || 26 | 0 | OFF  | SPDIFOUT | 11  | 17  |
 |  19 |  30 |    SDA.1 | ALT4 | 0 | 27 || 28 | 0 | ALT4 | SCL.1    | 31  | 18  |
 |  20 |  21 | PCM0DOUT |  OFF | 0 | 29 || 30 |   |      | 0v       |     |     |
 |  21 |  22 |  PCM0DIN |  OFF | 0 | 31 || 32 | 0 | OFF  | GPIO.26  | 26  | 7   |
 |   8 |  23 |  GPIO.23 |  OFF | 0 | 33 || 34 |   |      | 0v       |     |     |
 |  16 |  24 |     CTS3 | ALT4 | 0 | 35 || 36 | 0 | ALT4 | TxD3     | 27  | 13  |
 |   9 |  25 |  GPIO.25 |  OFF | 0 | 37 || 38 | 0 | ALT4 | RTS3     | 28  | 15  |
 |     |     |       0v |      |   | 39 || 40 | 0 | ALT4 | RxD3     | 29  | 14  |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |  H3 | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi |  H3 |
 +-----+-----+----------+------+---+-NanoPI M1+---+------+----------+-----+-----+

 +-----+----NanoPI M1 Debug UART---+----+
 |  H3 | wPi |   Name   | Mode | V | Ph |
 +-----+-----+----------+------+---+----+
 |     |     |       0v |      |   | 41 |
 |     |     |       5v |      |   | 42 |
 |   4 |  32 |     TxD0 | ALT5 | 0 | 43 |
 |   5 |  33 |     RxD0 | ALT5 | 0 | 44 |
 +-----+-----+----------+------+---+----+
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?