Git Product home page Git Product logo

wiringnp's People

Contributors

wertyzp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wiringnp's Issues

How to init pins on nanoPI NEO

I want to use the lcd example. But i see that the pins are still defined for the raspberry PI, i don't know the mapping, and how i cloud define them. And besides the example, how could i than define the pins.

GPIO PWM command

It's works right in RPi.
Pulse width is 1.5ms

gpio mode 1 pwm
gpio pwm-ms
gpio pwmc 1920
gpio pwmr 200 # 0.1 ms per unit
gpio pwm 1 15 # 1.5 ms

It's don't works right in NPi.
A pulse width isn't probably right.
gpio mode 33 pwm
gpio pwm-ms
gpio pwmc 1920
gpio pwmr 200 # 0.1 ms per unit
gpio pwm 33 15 # 1.5 ms

NanoPi Duo gpio readall showing -1 for IR-RX

I've forked and friendlyarms fork of this repo.
when running gpio readall I get the 'bold' output.
when changing the pin to output and high and low the gpio readall doesn't change (neither direction nor pin nor level) "24 | 0 | IN | GPIOL11 | 18 | -1 |"
+-----+-----+----------+------+---+-NanoPi-Duo--+------+----------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | | | MIC_N | | | 1 || 2 | | | EPhySPD | | | | | | MIC_P | | | 3 || 4 | | | EPhyLinK | | | | | | LineOutR | | | 5 || 6 | | | EPhyTXP | | | | | | LineOutL | | | 7 || 8 | | | EPhyTXN | | | | | | CVBS | | | 9 || 10 | | | EPhyRXP | | | | 198 | 8 | GPIOG6 | OFF | 0 | 11 || 12 | | | EPhyRXN | | | | 199 | 9 | GPIOG7 | OFF | 0 | 13 || 14 | | | USB-DP2 | | | | 15 | 7 | GPIOA15 | OFF | 0 | 15 || 16 | | | USB-DM2 | | | | 16 | 0 | GPIOA16 | OFF | 0 | 17 || 18 | | | USB-DP3 | | | | 14 | 2 | GPIOA14 | OFF | 0 | 19 || 20 | | | USB-DM3 | | | | 13 | 3 | GPIOA13 | OFF | 0 | 21 || 22 | 0 | OFF | GPIOG11 | 16 | 203 | | 12 | 12 | GPIOA12 | ALT5 | 0 | 23 || **24 | 0 | IN | GPIOL11 | 18 | -1 |** | 11 | 13 | GPIOA11 | ALT5 | 0 | 25 || 26 | | | 0v | | | | | | 0v | | | 27 || 28 | | | 3.3v | | | | 4 | 14 | GPIOA4 | ALT5 | 0 | 29 || 30 | | | 5v | | | | 5 | 15 | GPIOA5 | ALT5 | 0 | 31 || 32 | | | 5v | | | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+-NanoPi-Duo--+------+----------+-----+-----+

GPIO 0 cannot be turned on (out high)

I created an SD card with a fresh copy of "nanopi-neo2_friendlycore-xenial_4.14.52_20180628.img"

logged on as root via ssh

after the first boot I disabled UART2 with npi-config

then I installed wiringnp like this:

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

when I use: gpio mode 0 out the gpio is set to out
but when I do gpio write 0 1 the gpio is not set to high
this can been seen with the gpio readall command

If I do the same with GPIO 2 it works perfectly well.

Is this a bug or am I overlooking something?

uname -a
Linux NanoPi-NEO2 4.14.52 #94 SMP Thu Jun 28 18:34:19 CST 2018 aarch64 aarch64 aarch64 GNU/Linux
 +-----+-----+----------+------+---+-NanoPi-NEO2--+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 |     |     |     3.3V |      |   |  1 || 2  |   |      | 5V       |     |     |
 |  12 |   8 |  GPIOA12 | ALT5 | 0 |  3 || 4  |   |      | 5V       |     |     |
 |  11 |   9 |  GPIOA11 | ALT5 | 0 |  5 || 6  |   |      | 0v       |     |     |
 | 203 |   7 |  GPIOG11 |  OFF | 0 |  7 || 8  | 0 | ALT5 | GPIOG6   | 15  | 198 |
 |     |     |       0v |      |   |  9 || 10 | 0 | ALT5 | GPIOG7   | 16  | 199 |
 |   0 |   0 |   GPIOA0 |  OUT | 0 | 11 || 12 | 0 | OUT  | GPIOA6   | 1   | 6   |
 |   2 |   2 |   GPIOA2 |  OUT | 1 | 13 || 14 |   |      | 0v       |     |     |
 |   3 |   3 |   GPIOA3 |  OFF | 0 | 15 || 16 | 0 | OFF  | GPIOG8   | 4   | 200 |
 |     |     |     3.3v |      |   | 17 || 18 | 0 | OFF  | GPIOG9   | 5   | 201 |
 |  64 |  12 |   GPIOC0 | ALT4 | 0 | 19 || 20 |   |      | 0v       |     |     |
 |  65 |  13 |   GPIOC1 | ALT4 | 0 | 21 || 22 | 1 | OUT  | GPIOA1   | 6   | 1   |
 |  66 |  14 |   GPIOC2 | ALT4 | 0 | 23 || 24 | 1 | OUT  | GPIOC3   | 10  | 67  |
 +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
 | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
 +-----+-----+----------+------+---+-NanoPi-NEO2--+------+----------+-----+-----+

Add it to repository

Hello,
is it possible to add this library to the aforementioned service?

I have a NanoPi Neo and I think it's a good thing to be able to update the module directly from pypi with a simple command.

Cheers

gpio problem

gpio says.. on NEO2.....root@neo2:~/WiringNP# gpio readall
piBoardRev: Unable to determine board revision from /proc/cpuinfo
-> Is not H3 based board
-> You may want to check:
-> http://www.lemaker.org/

Adaptation for NanoPC T2

Hello, I would like to know if there is any kind of implementation for the WiringNP library for the NanoPC T2 board, If not, I would like to know what types of changes I have to make in the mapping to make this work.
I would also like to know the performance of the library in Khz or Mhz. (The basic test setup was toggle one of the GPIO pins between zero and one as fast as possible)
Best Regards

What about NanoPi2Fire support

Hi,
i'm able to manage GPIO pins by /sys/class/gpio in sys mode (export/unexport), to turn on a led for example, but i'm not able to manage a DHT11 or ultrasonic sensor, because it's not possible to "pullUpDnControl" on sys mode (wiringPiSetupSys)
What about nano pi 2 fire support on WiringNP?
That would solve my problem...
Let us know

execute permission

It's work fine.
Thank you!!
There are no execute permission in a build file.

$cd wiringNP
$sudo ./build
command not found

There is mapping bug

Thank you for usefull library.

static int pinToGpio [64] ={
0, 6, // 0, 1
2, 3, // 2, 3
200, 201, // 4 5
1, 203, // 6, 7
12, 11, // 8, 9
67, 17, //10,11
64, 65, //12,13
66, 198, //14,15
199, -1, //16,17
-1, -1, //18,19
-1, 20, //20,21
21, 8, //22,23
// 13, 9, //24,25
16, 9, //24,25 // Update nopnop2002
// 7, 16, //26,27
7, 13, //26,27 // Update nopnop2002
15, 14, //28,29
19, 18, //30,31

static int pinTobcm [64] ={
19, 18, //map to BCM GPIO0,1
12, 11, //map to BCM GPIO2,3
203, 20, //map to BCM GPIO4,5
21, 17, //map to BCM GPIO6,7
67, 65, //map to BCM GPIO8,9
64, 66, //map to BCM GPIO10,11
7, 8, //map to BCM GPIO12,13
198, 199, //map to BCM GPIO14,15
// 16, 0, //map to BCM GPIO16,17
13, 0, //map to BCM GPIO16,17 // Update nopnop2002
// 6, 13, //map to BCM GPIO18,19
6, 16, //map to BCM GPIO18,19 // Update nopnop2002
15, 14, //map to BCM GPIO20,21
3, 200, //map to BCM GPIO22,23
201, 1, //map to BCM GPIO24,25
// 9, 13, //map to BCM GPIO26,27
9, 2, //map to BCM GPIO26,27// Update nopnop2002

undefined symbol: wiringPiSetup

My apologies if I am asking this in the wrong place, but i have reached a complete dead end!

I am using a library called node-rcswitch which is reliant on WiringPi.

I am running my project off of a NanoPi NEO so have installed WiringNP as a replacement for WiringPi. node-rcswitch uses the -lwiringPi flag when compiling and does so without error.

However, when i come to use it at run time i get the following error: undefined symbol: wiringPiSetup

Am i missing something with regards to WiringNP? As far as i understand it, WiringNP can be used in exactly the same way as WiringPi. I just can't figure out why its not working at runtime. =(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.