arikff
Posts: 9
Joined: Wed Mar 29, 2017 9:26 pm

Audio Data in Raspberry pi 3 with Transceiver nRF24L01+

Wed May 17, 2017 1:30 pm

hello,
Someone know how to send and recesve Audio Data in Raspberry pi 3 with Transceiver nRF24L01+,
in python?
I khow how to send text or numbers but dont know how to send or recesve Audio Data,

I add here the code in python that i use for send text data.

###############################################
import RPi.GPIO as GPIO
from lib_nrf24 import NRF24
import time
import spidev

GPIO.setmode(GPIO.BCM)


pipes=[[0xe7, 0xe7, 0xe7, 0xe7, 0xe7],[0xc2, 0xc2, 0xc2, 0xc2, 0xc2]]

radio = NRF24(GPIO, spidev.SpiDev())
radio.begin(0, 17)
radio.setPayloadSize(32)
radio.setChannel(0x60)

radio.setDataRate(NRF24.BR_2MBPS)
radio.setPALevel(NRF24.PA_MIN)
radio.setAutoAck(True)
radio.enableDynamicPayloads()


#radio.openReadingPipe(1, pipes[1])
radio.openWritingPipe(pipes[1])
radio.printDetails()

#radio.startListening()

while True:
message = list("Hello Word")
radio.write(message)
print("We sent the message of{} ".format(message))

# check if returned a ackPL
if radio.isAckPayloadAvailable():
returnedPL = []
radio.read(retunedPL, radio.getDynamicPayloadSize())
print(" our returned payload was {} " .format(returnedPL))
else:
print(" No payload received")
time.sleep(1)

######################################
Thanks,
Arik

selo20
Posts: 1
Joined: Sun Nov 12, 2017 4:17 pm

Re: Audio Data in Raspberry pi 3 with Transceiver nRF24L01+

Sun Nov 12, 2017 4:21 pm

Hello

I have the same problem !

I want to build a Musikplayer with raspberry and the Loudspeaker with Arduino. I want to use the NRF24L01, too.

Please help!

Return to “Python”

Who is online

Users browsing this forum: RogerW and 14 guests