Wireless Audio Visualiser

While locked in cold isolation i have devised something to keep myself occupied yet i have reached a snag
That snag is i know nothing of wireless data transmition… So i need someone with some knowledge to assist me.

I have previously build an LED Staff (Something like this) with 30 WS2812b’s on each end. Powered off of two 18650 Li-Ion batterys with overcharge circuits and DC-DC buck converter to reach the 5V needed for the LED’s. “It worked great i managed to get about 10 Hours run time from it.”

Now i followed this “Mega AudioVisualiser Unit” build for the basics of the staff but used a Nano instead of the recommended Mega. The filesize was way to excessive for the poor nano to handle so i stripped all of the AudioVisualising code out “as it was unneeded” to allow a 10% overhead for the nano to breathe.

Now i want to combine these into one UberProject. Using Two HC-12 Transceivers if possible.
I need help working out the coding and alterations to code that will make it transmittable.

Ive worked up a couple example circuits so if anyone could take a look and tell me what i’ve done wrong?

-Mega Circuit-


Circuit Preview (Editable file as attachment)
-Nano/Receiver Circuit-

Circuit Preview (Editable file as attachment)
For this circuit I do not know whether i will need a nano in it to convert the transmitter signal into a usable signal for the WS2812B’s

I also know it seems a bit strange with the two DC-DC step ups in the circuit but i have got this working previously and had no issues with it. I did forget to add a power switch after sealing the unit so i had to leave it in the garden running for about 10hours before the charge died and i could safely recover the components… :confused:

I do not know which tranceivers i will use yet as i am still researching benefits/downsides any tips appreciated!

In this mega project i have the RX0 pin assigned to an interrupt button too interupt the current LED cycles.
Will the wireless modules require a specific RX pin or can i use any of them listed in the table below?

Serial: serial port object. See the list of available serial ports for each board on the Serial main page.
val: the value to print. Allowed data types: any data type.

Board Serial pins Serial1 pins Serial2 pins Serial3 pins

Nano 0(RX), 1(TX)

Mega 0(RX), 1(TX) 19(RX), 18(TX) 17(RX), 16(TX) 15(RX), 14(TX)

Parts.zip (5.53 KB)

Your picture of the Mega circuit is particularly dumb. You have no good reason for switching D0 to ground, and will deserve all the grief you might get if you did. There must be some other pin equally available, and may even use less wire.

With wireless on pins 2,3, you imply you are using software serial. Please don't tell your mother this. You apparently already know Mega has four hardware serial ports, so use one of them - usually serial 1>3.

Nick_Pyner:
Your picture of the Mega circuit is particularly dumb. You have no good reason for switching D0 to ground, and will deserve all the grief you might get if you did. There must be some other pin equally available, and may even use less wire.

I am only using the button on D0 for temporary verification of a button press as WS2812B LED's have a tendency to reject interrupts and i needed to be able to see if the button was correctly pressed.

Nick_Pyner:
With wireless on pins 2,3, you imply you are using software serial. Please don't tell your mother this. You apparently already know Mega has four hardware serial ports, so use one of them - usually serial 1>3.

Stick with me on this one. Im fairly new to wireless transmition on arduinos. All the references i've found for implementing them have either been extremely basic (Wiring up a server controller) Or severly complex (Wireless home automation basestations).

Can the receiver transfer directly into the WS2812b strips? Or would i need to have a nano as a converter for the signal?

pathogenex:
I am only using the button on D0 for temporary verification of a button press as WS2812B LED's have a tendency to reject interrupts and i needed to be able to see if the button was correctly pressed.

Even for "temporary verification", why use about the worst possible choice? There is a swag of other pins, surely?

All the references i've found for implementing them have either been extremely basic (Wiring up a server controller) Or severly complex (Wireless home automation basestations).

Can the receiver transfer directly into the WS2812b strips? Or would i need to have a nano as a converter for the signal?

I'm just saying... Software serial isn't such a great idea, Mega has for hardware serial ports, so you might as well use one for this. What I am talking about is the use of serial, not the wireless.

I don't know about the strips.

Nick_Pyner:
Even for "temporary verification", why use about the worst possible choice? There is a swag of other pins, surely?

You're right, I've changed it over to a seperate pin and its working flawlessly while blinking onboard LED. Not sure why i chose to use that pin, might have just been a stupid late night mistake...

Nick_Pyner:
I'm just saying... Software serial isn't such a great idea, Mega has for hardware serial ports, so you might as well use one for this. What I am talking about is the use of serial, not the wireless.

I don't know about the strips.

I get what you mean now. I've been doing more looking into wireless transmittion and was stupid to think it wouldn't need access to serial pins, another late night insane idea...

I have just received two sets of HM-10 transmitters so i will be working with adjusting coding for transmittion. If you're good with scripting and have a spare hour to talk/ look over the code i'm using to help with transmitting / receiving i'd appreciate any help i can get.
Thanks again for opening my eyes to my stupidity :o

Ok i’m going to upload the code i’m using here in the hopes someone can guide me while i work through it.
What i need is to seperate the code into two sets.
One for the Mega (Master Transmit) and One for the Nano (Slave Receive).

I am going to be using HM-10 BLE modules.

If it turns out i’m overambitious i will have to swap the Nano out for a teensy 3.2 as it has the capacity for the entire code as well as multiple Serial I/O ports.
If i end up having to use the teensy would i be correct in thinking it will be simpler as instead of editing the code i would just need to transmit the line in data? I understand there are some issues with baudrates and audio transmition yet im just looking into that now.

EDIT = Ok after a quick search i have found i am being a dunce on this one. So BLE will not support audio streaming. I will need to find a BR/EDR if i am going to want to transmit audio only…

EDIT 2 = After another minute of searching i have found that at the start of year there was a release of BT 5.2 which supports LE audio transmit…

Bluetooth 3.0 Audio module?

Datasheet
Command List + setup

Full code as attachment. It far exceeds the allocated 9k character limit of posts…

This is not my code. It’s from Cinelights @ Youtube. I’ve been using a modified version for my setup but i’ll post his as it is the cleanest version. I will be slicing this down further to only Mono audio.

Stereovupushbutton.zip (339 KB)