Page 1 of 1

Nanopc M4 ubuntu 18 GPIO python module

Posted: Thu Oct 25, 2018 3:20 pm
by wkho
import RPi.GPIO_NP as GPIO is NOT working on M4.
If it is ported into the ubuntu 18 image yet??
Pls help as I am trying to port the software from pi to M4 .

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Thu Nov 15, 2018 8:47 pm
by necroweg
Hello,
could you solve your problem?
I had the same problem and was able to solve it with Wiringpi Python.
look here: http://wiki.friendlyarm.com/wiki/index. ... _RK3399/zh

best regards
necroweg

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Fri Jan 04, 2019 2:51 pm
by pavelectric
Hello, friends!
Well, I found time to experiment with the GPIO M4 board.
What to say - everything is simple and clear.
Here is the result of a short program (Python):
Image

Naturally answer all your questions.
Sincerely, Pavel.

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Sat Jan 12, 2019 9:04 pm
by pavelectric
Hello, friends!
In the continuation of experiments with GPIO M4 boards ...
Today, experiments were carried out with the OLED display 128x64. I2C interface.
The library was used by ssd1306 under Python.
Image
Everything is actually quite simple and straightforward.
Do not be afraid to conduct small home experiments, it is exciting and useful!

Naturally answer all your questions.
Sincerely, Pavel.

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Sun Jan 27, 2019 9:38 am
by pavelectric
Hello, friends!
Continuing to experiment with GPIO M4 boards ...
Today, experiments with the 128x64 I2C OLED display were continued,
but already in conjunction with the BMP280 sensor.
Image
The display is of course too small for simultaneous display of all the necessary information, so some of the information in the code is still commented out. A button will be made, which will allow "flipping pages".
The essence of all these experiments is simple and clear - not only on the “fruit boards” you can get good results in your experiments. Do not be afraid to try!

Naturally answer all your questions.
Sincerely, Pavel.

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Tue Aug 06, 2019 10:16 am
by nuno pinheiro
i also have the same problem
import RPi.GPIO as GPIO
RuntimeError: This module can only be run on a NanoPi NEO/NEO2!

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Tue Aug 06, 2019 5:02 pm
by pavelectric
nuno pinheiro wrote:
i also have the same problem
import RPi.GPIO as GPIO
RuntimeError: This module can only be run on a NanoPi NEO/NEO2!

I never understood such questions ...
You buy boards, you plan to do something with them.
So what the hell no one can read WiKi from the manufacturer !!!!!!!
Why don't search engines give you answers ???
Especially for Lazy:
1. http://wiki.friendlyarm.com/wiki/index. ... for_RK3399
2. https://github.com/Pavelectric/WiringPi_M4
3. https://github.com/Pavelectric/Python_GPIO
Where is there at least one mention of "RPi.GPIO" ???
This is not a terrible raspberry, it is a completely different class of boards!
Just think before you do anything ...

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Sun Aug 11, 2019 12:22 pm
by pavelectric
Hello, friends!
To maintain interest in the board, I will post some of my photos and videos.
Image
Image
Image
Image
Image
Image


https://www.youtube.com/watch?v=vb1XX_IGZ9U

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Mon Aug 12, 2019 2:25 am
by v8dave
Nice little project.

Is the CPU temperature available on these boards or did you add this yourself with an external sensor? I am running Android on a T4 and I have been trying to get this working but no success so far. I might be missing the kernel driver for it. I might need a JNE to get this. The Android OS has a system call but it returns 0 for me.

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Mon Aug 12, 2019 12:08 pm
by escobarrr
I think you should add an external one.

________________________________________
Mini Militia App Lock 7Zip

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Mon Aug 12, 2019 1:40 pm
by pavelectric
v8dave wrote:
Nice little project.

Is the CPU temperature available on these boards or did you add this yourself with an external sensor? I am running Android on a T4 and I have been trying to get this working but no success so far. I might be missing the kernel driver for it. I might need a JNE to get this. The Android OS has a system call but it returns 0 for me.


Quite simple, the CPU temperature "lives" here:
/sys/class/thermal/thermal_zone0/temp
It is very convenient to display it this way:
$ cat / sys / class / thermal / thermal_zone0 / temp | cut -c 1-2

In general, if you are interested, my little crafts can be read here:
https://github.com/Pavelectric/Python_GPIO
escobarrr wrote:
I think you should add an external one

No ;)

In general, if you look globally at the board (M4), then no one has such functionality and power.
Now we are working on a project related to SDR Radio (I will show the results a little later).
And all the experiments with GPS, BME280, OLED and other elements are all parts of a large project.
I will definitely share the results and details.

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Mon Aug 12, 2019 2:16 pm
by v8dave
I also tried with with my T3 Plus and there is no thermal directory under the /sys/class directory :(

Re: Nanopc M4 ubuntu 18 GPIO python module

Posted: Mon Aug 12, 2019 2:56 pm
by pavelectric
v8dave wrote:
I also tried with with my T3 Plus and there is no thermal directory under the /sys/class directory :(


Well, I don’t know about T3, I don’t have it.
But in M4 everything is there, I take the data from there.
Operating System - Frendly Core.
I do not use Android.