Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for WiringNP #16

Open
guyluz11 opened this issue Jun 13, 2019 · 4 comments
Open

Add support for WiringNP #16

guyluz11 opened this issue Jun 13, 2019 · 4 comments

Comments

@guyluz11
Copy link

guyluz11 commented Jun 13, 2019

The code worked on Raspberry Pi 3.
But on NanoPi NEO2 running the command :
dart example/example.dart
And getting the Error:

Unhandled exception:
RpiGpio initialization failed: -1
#0      new RpiGpio (package:rpi_gpio/rpi_gpio.dart:26:7)
#1      main (file:///home/pi/newSnap/rpi_gpio.dart/example/example.dart:12:20)
<asynchronous suspension>
#2      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:19)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)

As you can see from this post

the CPU in the Raspberry Pi 3 is 64-bit, but the Raspbian OS has not yet been updated for a 64-bit device.

The NanoPi NEO2 have the same processor as Raspberry Pi 3 (ARM Cortex-A53).
NanoPi NEO2 CPU: Allwinner H5, Quad-core 64-bit high-performance Cortex A53

Same error happening on NanoPi NEO
Command:
dart example/example.dart
Error:

Unhandled exception:
RpiGpio initialization failed: -1
#0      new RpiGpio (package:rpi_gpio/rpi_gpio.dart:26:7)
#1      main (file:///home/pi/git/rpi_gpio.dart/example/example.dart:12:20)
<asynchronous suspension>
#2      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:19)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)

NanoPi NEO CPU: Allwinner H3, Quad-core Cortex-A7 Up to 1.2GHz

@guyluz11 guyluz11 changed the title cant run on armhf cant run on aarch64 Jun 13, 2019
@guyluz11 guyluz11 changed the title cant run on aarch64 Cant run on aarch64 architecture Jun 13, 2019
@guyluz11 guyluz11 changed the title Cant run on aarch64 architecture Add support for raspberry pi based devices Jun 14, 2019
@guyluz11
Copy link
Author

guyluz11 commented Jun 14, 2019

Tried running the code on Raspberry Pi 3 with ubuntu MATE OS both aarch32 ARMv7 and aarch64 ARMv8 OS install and it worked.
So the architecture of the OS is not the problem.

@guyluz11 guyluz11 changed the title Add support for raspberry pi based devices Add support for WiringNP Jun 15, 2019
@guyluz11
Copy link
Author

guyluz11 commented Jun 15, 2019

Found out that WiringNP and WiringPi are not the same.
On the WiringNP git hub page

This is a GPIO access library for NanoPI. It is based on the WiringOP for Orange PI which is based on original WiringPi for Raspberry Pi.

WiringNP is based on WiringPi, so in theory it will be much easier to add support for it.
Can you add support or point me in the direction to build it myself with WiringNP instead ?

@danrubel
Copy link
Owner

Thank you for all the useful information. This is not something I have investigated yet. I have not had time to focus on this package recently, but hope to do so sometime in the fall.

@danrubel
Copy link
Owner

danrubel commented Oct 7, 2024

Version 0.10 now relies on libgpiod so that it will work on RPi v5.
Please let me know if it now works in your situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants