Giter Site home page Giter Site logo

rpi.gpio.64's Introduction

RPi.GPIO.64

This is a modification of the original RPi.GPIO code to add 64bit OS support.

The idea of this modification is the detection of the revision and model of the raspberry pi on 64 bit operation systems using the Device Tree instead of the older method (reading the cpuinfo).

Tested on RPi3b but in theory will work with any model of raspberry pi.

PLEASE dont report bugs to the original maintainer!

Installation

Download and install as local package or install from github directly:

pip install git+https://github.com/TheNextLVL/RPi.GPIO.64.git

Tips [RPi 3b]

I recomend the usage of the kernel of sakaki (work in any 64bit OS).

Check that the group gpio exists and the current user (usually pi) belong to that group.

Check that any user has the correct permissions to the device /dev/gpiomem (crw-rw----) and belongs to root:gpio --> more info

Original README file

This package provides a class to control the GPIO on a Raspberry Pi.

Note that this module is unsuitable for real-time or timing critical applications. This is because you can not predict when Python will be busy garbage collecting. It also runs under the Linux kernel which is not suitable for real time applications - it is multitasking O/S and another process may be given priority over the CPU, causing jitter in your program. If you are after true real-time performance and predictability, buy yourself an Arduino http://www.arduino.cc !

Note that the current release does not support SPI, I2C, hardware PWM or serial functionality on the RPi yet. This is planned for the near future - watch this space! One-wire functionality is also planned.

Although hardware PWM is not available yet, software PWM is available to use on all channels.

For examples and documentation, visit http://sourceforge.net/p/raspberry-gpio-python/wiki/Home/

rpi.gpio.64's People

Contributors

thenextlvl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rpi.gpio.64's Issues

Group 'gpio' doesnt work without sudo

Im not sure if this is a Kernel issue or not.
I am running on the raspberry pi 3B+ archlinux arm64 and am required to run all gpio commands with sudo.
Doing some research it seems that the issue is that the GPIO service will use /dev/gpiomem if it exists, otherwise it will use /dev/mem. My pi does not have /dev/gpiomem

I believe the distinction is made so that everyone in gpio can see only the gpio registers without reading all of RAM?

Is this something you can fix or adjust on your end or should I email the distro maintainer?

Doesn't work on Raspberry Pi 3B+ on archlinux arm64

I successfully installed the 64 bit version of archlinuxarm on my raspi.
I installed this library using git clone and sudo python setup.py
This seemed to work correctly.
I then tried to write a python script using the library (using the same functions from 32 bit, as I believe they are the same), and was given the issue:
"Runtime error: this module can only be run on a raspberry pi!"

Let me know if I can provide any more details or help in debugging!

Compilation / linker error on Arch Linux (running on Pi)

Due to a change in gcc, a flag needs to be added while compiling the code (see https://www.raspberrypi.org/forums/viewtopic.php?t=244375):
CFLAGS=-fcommon

otherwise, the install fails with a linking error:

/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-req-build-q65ingrr/source/common.h:41: multiple definition of module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-req-build-q65ingrr/source/common.h:41: first defined here /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-req-build-q65ingrr/source/common.h:40: multiple definition of setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-req-build-q65ingrr/source/common.h:40: first defined here
[snip]

So to install the package, the command would be:
CFLAGS=-fcommon pip install git+https://github.com/TheNextLVL/RPi.GPIO.64.git

Or even better, add extra command line args to the Extension in setup.py:
ext_modules = [Extension('RPi._GPIO', ..., extra_compile_args = ['-fcommon'])]

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.