Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simultaneous multi peripheral support #3

Open
MorGuux opened this issue Nov 24, 2020 · 4 comments
Open

Simultaneous multi peripheral support #3

MorGuux opened this issue Nov 24, 2020 · 4 comments

Comments

@MorGuux
Copy link
Owner

MorGuux commented Nov 24, 2020

Requires some bandwidth testing on:

  • Serial communication for relaying led/screen data (should be more than adequate)
  • Wireless data transmission capacity

Speeds highly depend on the type of devices used. For example, a dozen button boxes require very little transmission bandwidth, as data is only sent on button presses. A few screens and LEDs would use much more bandwidth, so this needs some testing.

Full duplex isn't possible without two nrf modules per device. Thus there are two ways of enabling half duplex support:

  • Switch module from RX to TX, send message, then switch back (can be slow and miss messages during inactivity)
  • Use ack payloads to achieve call response, so no switching of module

The second method seems to be the most suited way currently, as if a screen/LEDs is used, and s button is pressed, a response can be returned within 1/60th of a second (since the data is 60hz).

There may be issues when multiple peripherals are used, with noticeable lag / delay, but this will have to be tested. For now, button boxes should function fine, screen/led units should function fine, but mixing both input and output into one device might cause slowdown.

@MorGuux MorGuux created this issue from a note in WirelessWheel (To do) Nov 24, 2020
@drouij67
Copy link

Hello, i used your button matrix code to successfully setup a wireless button plate. I planned to run a second set of pro micros to run led's and Nextion but was unable to get it working. Were you ever able to get it working for nextion and WS2812?

@MorGuux
Copy link
Owner Author

MorGuux commented Jul 16, 2021

Hi. I'm glad to hear you got it working. I abandoned the project when I discovered that setting up the hardware, I could not get it stable and instead thought of switching to bluetooth. If it works for you though, then great!

In the master branch, I did get the WS2812 LEDs to work, by encoding the RGB data as a string (with 8 LEDs and 3 bytes per LED equaling 24 total bytes) and sending it. I never tried the nextion part, but it would be a similar process where you'd send data and parse it on the receiving end.

You may wish to try and modify the master code to change what the nextion method sends (I just duplicated the LED code). Maybe sending a struct of data like rpm, speed, fuel etc that you can parse. Updating the nextion on the receiving end is pretty simple, the protocol is quite basic.

Let me know if you need any info, I'm happy to help.

Morgan

@drouij67
Copy link

drouij67 commented Jul 16, 2021 via email

@MorGuux
Copy link
Owner Author

MorGuux commented Jul 16, 2021

It's the code in the master branch. You can see the LED implementation there, and the broken nextion implementation (but with methods present that just need populating).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants