I have an Dragino LoRa board that is stacked on to my Arduino Uno board which is connected to my Raspberry Pi using the USB A to USB B cable. There is two identical sets of them. One for transmitting data and the other to receive data.
The idea of this project is to record audio from a mic input from the transmitting set and play it back through a speaker on the receiving end. Trying to make something like a walkie talkie. I will have to encode and packetize the data with checksum verification and transmit the data through LoRa between the two sets. If all works out the next step is to make it into a two way transmission so that both the sets can transmit and receive data.
I have no background on this so any help would be appreciated. Thank you!
The Arduino Uno, only has 2K of read / write memory for everything, so if you fill it all with audio, that will only be about a quarter of a second or so that you can record without a break.
So it is not really the Arduino for the job, you need something a bit more meaty.
No.
Because while the Arduino is busy assembling the packages it is not recording so there will be gaps in the sound when you come to put them together.
Isn’t it the pi’s job to split/reassemble the packet? I just need the arduino to get this packets from the pi and send them over to the dragino which will then transmit it via LoRa
The Arduino is not very fast nor does it have much memory. It doesn't bring much to the party. You would be better off doing the digitalising at the Pi end and forget about the Arduino. A cheap sound card for the Pi would be much better.
I couldn’t find a way to just attach the Dragino LoRa board to the pi. Had to use the Arduino as a medium between the two of them. Pi connected to Arduino via USB A to USB B cable and Dragino stacked on top of the Arduino Uno using the pins.
Can I also just ask is it not possible for the pi to convert the audio data into binary data and split them into small packets. Which the arduino will receive and send them to the Dragino. Upon transmission via LoRa the receiving set will receive this packets and the pi will then reassemble and play back the audio
If I were tasked with doing this on Arduino, I'd use two ESP32s or if I must, a Raspberry Pi and an ESP32.
Communicate using Bluetooth A2DP audio protocol: encode the audio into A2DP on one end, stream audio via Bluetooth, and decode the A2DP on the other end. There are libraries for this that run on the ESP32.
Thank you for the suggestion. Unfortunately my project requires me to use only an Arduino UNO board. The encoding and packetizing is to be done by my raspberry pi and the Arduino has to only transmit this data from the pi to the Dragino
I don't know whether you should be concerned but in several of the frequency bands in which LoRa can be used licence free there is a duty cycle restriction that would make it hard to transmit continuous audio.
Think about the audio that occurs while one packet is being arranged and then transmitted. Where will that portion of your audio go? Nowhere, it will be a noticeable gap. Is that ok?