exmorse / pyradioheadnrf24 Goto Github PK
View Code? Open in Web Editor NEWRadioHead NRF24 Python wrapper for Raspberry Pi
RadioHead NRF24 Python wrapper for Raspberry Pi
Hello ,
Is it possible to use the RHMesh manager using this module? If yes , how can I do that ?
I see the managerInit function for setting the manager node but there is nowhere any option for declaring this manager as a mesh manager.
Greetings
Hi,
Thank you for this library wrapper, took me a while to realise I couldn't just hit F5 in Geany programmer and instead had to use sudo ./server.py
in the terminal after changing the directory to the folder above.
I also noticed that your __init__.py
file had 3 underscores after init instead of 2.
Anyway, I would like to add the ability to use the setModeIdle()
, setModeTx()
and setModeRx()
functions.
I can see they are built into the RH_NRF24.cpp
and RH_NRF24.h
so I tried adding
def setModeIdle(self):
radiohead.setModeIdle()
def setModeTx(self):
radiohead.setModeTx()
def setModeRx(self):
radiohead.setModeRx()
to pyRadioHeadNRF24.py
.
However I am getting this error, could you help please?
Traceback (most recent call last):
File "./Control_Node111_v3.py", line 20, in <module>
nrf24.setModeIdle()
File "/home/pi/pyRadioHeadNRF24/pyRadioHeadNRF24.py", line 148, in setModeIdle
radiohead.setModeIdle()
File "/usr/lib/python2.7/dist-packages/cffi/api.py", line 718, in __getattr__
make_accessor(name)
File "/usr/lib/python2.7/dist-packages/cffi/api.py", line 713, in make_accessor
raise AttributeError(name)
AttributeError: setModeIdle
btw I am utilising the nrf24L01 (https://www.amazon.co.uk/gp/product/B010N32SGM/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1) on my Pi3.
Thanks!
Hello,
Hope you don't mind if I raise an issue here to get your support.
I would really like to use your python wrapper on Raspberry PI but I am having troubles installing the cffi library in virtual environment.
pi@pimaster:~/tlaloc $ python ../download/pyRadioHeadNRF24-master/examples/reliable_datagram_server.py
Traceback (most recent call last):
File "../download/pyRadioHeadNRF24-master/examples/reliable_datagram_server.py", line 8, in
import pyRadioHeadNRF24 as radio
File "/home/pi/download/pyRadioHeadNRF24-master/pyRadioHeadNRF24.py", line 3, in
from cffi import FFI
ImportError: No module named cffi
Trying to install cffi with pip
venv/bin/pip install cffi
gives me this error:
Command /home/pi/tlaloc/venv/bin/python2 -c "import setuptools, tokenize;file='/tmp/pip-build-hf8YBc/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-oBaOuD-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/tlaloc/venv/include/site/python2.7 failed with error code 1 in /tmp/pip-build-hf8YBc/cffi
Thanks a lot in advance for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.