Wiringpi Python documentation

Post Reply
easybob95
Posts: 26
Joined: Mon Apr 08, 2019 4:02 pm
languages_spoken: english
Has thanked: 0
Been thanked: 3 times
Contact:

Wiringpi Python documentation

Unread post by easybob95 » Tue May 14, 2019 10:13 pm

Hello,

i have just read wiringpi section in Odroid wiki. Interesting but there is a lack of informations about Wiringpi python binder.

It would be very useful to get a well documented python binder. I have to make some adafruit boards work with the odroid N2 and i need to understand how replacing GPIO routines for raspberry with GPIO routines for N2.

Many thanks in advance.

Alain

lsc1117
Posts: 116
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 0
Contact:

Re: Wiringpi Python documentation

Unread post by lsc1117 » Wed May 15, 2019 11:55 am

Hi easybob95,

Can you share the GPIO routines for RPI you are trying to make?
You can refer to the wiringpi number of N2 with this link.
https://wiki.odroid.com/odroid-n2/appli ... o/wiringpi

joshua.yang
Posts: 198
Joined: Fri Sep 22, 2017 5:54 pm
languages_spoken: Korean, English
ODROIDs: XU4, XU4Q + Cloudshell2, H2
Has thanked: 0
Been thanked: 11 times
Contact:

Re: Wiringpi Python documentation

Unread post by joshua.yang » Wed May 15, 2019 12:26 pm

Hi.

WiringPi numbers would be the same with Raspberry Pi. The physical pin numbers are different from each other but the WiringPi numbers are not.

To use WiringPi Python Wrapper, you can start with importing wiringpi package as follows.

Code: Select all

import wiringpi as wpi
 
wpi.wiringPiSetup()
wpi.wiringPiSetup() is needed to work with WiringPi as in the same way of WiringPi C version does.

And the core functions Python Wrapper supports are indirectly listed here: https://wiki.odroid.com/odroid-xu4/appl ... on_wrapper
If you want to use void digitalWrite (int pin, int value), you can use this as if it were def digitalWrite(pin, value).

We're not providing specific documentation for now for WiringPi Python Wrapper since it is not that different from the original one, and it isn't difficult to use if you're familiar with the original C language version of this.
So we'd decided to provide only some examples in the 2 languages.

Please understand for this. We're improving our Wiki pages, and someday (ASAP) we will update WiringPi pages too, to become well-documented to use. :)

easybob95
Posts: 26
Joined: Mon Apr 08, 2019 4:02 pm
languages_spoken: english
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Wiringpi Python documentation

Unread post by easybob95 » Wed May 15, 2019 3:05 pm

lsc1117 wrote:
Wed May 15, 2019 11:55 am
Hi easybob95,

Can you share the GPIO routines for RPI you are trying to make?
You can refer to the wiringpi number of N2 with this link.
https://wiki.odroid.com/odroid-n2/appli ... o/wiringpi
Hello lsc117,

thx for the link. I have already seen this wiki page.

I made a standalone system to make a kind of sky survey with a motorized azimutal mount, a camera and a lens. You can see it here if you want : viewtopic.php?f=177&t=34503

I mainly use GPIO for the mount (stepper motors control, manual control, gyroscope/compass control, ADC joystick signal control).

So, i use Adafruit libraries like GPIO, MCP3008, MotorHAT, BNO055 and PureIO.

That's quite a lot libraries.

Alain

easybob95
Posts: 26
Joined: Mon Apr 08, 2019 4:02 pm
languages_spoken: english
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Wiringpi Python documentation

Unread post by easybob95 » Wed May 15, 2019 3:24 pm

joshua.yang wrote:
Wed May 15, 2019 12:26 pm
Hi.

WiringPi numbers would be the same with Raspberry Pi. The physical pin numbers are different from each other but the WiringPi numbers are not.

To use WiringPi Python Wrapper, you can start with importing wiringpi package as follows.

Code: Select all

import wiringpi as wpi
 
wpi.wiringPiSetup()
wpi.wiringPiSetup() is needed to work with WiringPi as in the same way of WiringPi C version does.

And the core functions Python Wrapper supports are indirectly listed here: https://wiki.odroid.com/odroid-xu4/appl ... on_wrapper
If you want to use void digitalWrite (int pin, int value), you can use this as if it were def digitalWrite(pin, value).

We're not providing specific documentation for now for WiringPi Python Wrapper since it is not that different from the original one, and it isn't difficult to use if you're familiar with the original C language version of this.
So we'd decided to provide only some examples in the 2 languages.

Please understand for this. We're improving our Wiki pages, and someday (ASAP) we will update WiringPi pages too, to become well-documented to use. :)
Hello,

thx for the informations.

As i said in my previous post, i use some Adafruit libraries (GPIO, MCP3008, MotorHAT, BNO055 and PureIO) and i also use gpiozero library.

Those libraries are well documented and it was quite easy to use them.

There are some interesting informations about wiringpi in the wiki pages but i think it's a bit light (for example, i don't know haow to setup the gpio to get a UART instead if an IO pin etc.).

I think i will wait for more documented wiringpi and for now, i think i will keep the raspberry to control the motorized mount and i will use the Odroid N2 to control the camera. It will be easier as raspberry control hardware without problem. I just need to find a way to exchange informations (gyroscope/compass data) between the raspberry and the Odroid because i need those in infromations to know what part of the sky i am looking at.

I hope you will bring in the future some detailled informations about gpio and wiringpi (i mean useful informations for newbie like me) in order to help developing gpio use with python. Odroid N2 is a great SBC and we need to be able able to use all its potential.

Alain

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 3 guests