Raspberry gpio & pigpio & nrf24l01+

Job Description:


I have two different python codes.

(1) The 1st one is to control the moving of a very simple robot. The code is like below. Except the first line, all the “gpio” are lower cases.

import [login to view URL] as gpio

import time

def init():

[login to view URL]([login to view URL])

[login to view URL](19, [login to view URL])

def forward(tf):


[login to view URL](19, True)

[login to view URL](tf)

[login to view URL]()

while (1):

forward (4)

[login to view URL] (4)

(2) For the 2nd python code, I have nrf24l01 device, and I also use pigpio library. The nrf24l01 is to send and to receive data, and the pigpio library is to control some pins to do some works

Import [login to view URL] as GPIO

From lib_nrf24 import NRF24

Import time

Import spidev

Import pigpio

pi = [login to view URL] ()

[login to view URL] ([login to view URL])


[login to view URL] (message) # this line to send data, AND IT HAS TRACEBACK ERROR


[login to view URL](receivedMessage, [login to view URL]()) # this line to receive data

The 1st and 2nd codes are working perfectly when they are not coupled together, but when I place them together, it is not working. I change all “gpio” to “GPIO” in the first code before coupling the two codes together but it is still not working. Would you advise me what could be the reason? The error seems related to gpio setting of nrf24l01 device.

I get pigpio library from [login to view URL], and nrf24l01 library is from [login to view URL]

Compétences : Arduino, Electronique, Linux, Microcontrôleur, Python

Concernant le client :
( 10 commentaires ) PLEASANTON, United States

Nº du projet : #17849279

Décerné à:


If they are working separately but not working together, I would expect there are either issues with the pin settings for the GPIO, perhaps they are trying to use the same pins, or something with the variables getting Plus

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 2 jours
(1 Évaluation)

4 freelances font une offre moyenne de 39 $ pour ce travail


Hello sir, I have experience in designing electronics circuits and can make your project. i will make your project completely on my side and will deliver a working prototype. I can also develop hardware compatible and Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(43 Commentaires)

I will make this project quickly and efficiently. I have experience in IoT more than 5 years. Thank You

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)