not-matt / Systematic-LEDs

Audio reactive, all in one, room lighting for your computer.
MIT License
100 stars 35 forks source link

Raspberry Pi to ESP8266 #70

Open david-bour opened 5 years ago

david-bour commented 5 years ago

So far I've seen issues related to using the PI itself to generate the data, but what if I wanted to connect my ESP8266s to my Pi. Would this be feasible? Also, would it be too under powered?

The ideal setup I have is (1) Set up Pi so my phone can connect to it through bluetooth (2) Play music on my phone (3) Music sends signal to my ESP8266s

Update: I got this working for one ESP8266, will try pairing multiple and reporting back the results of it. Update2: Tried 2 and the lag was insane. The pi couldn't keep up with two lights. I might have to rethink how I could use my phone to stream music and interact with the esp8266s that have the LEDs.

richyxi commented 5 years ago

Did u have any issues running main.py in RPI? I'm trying to running on Linux but a have a bunch of error, I would like to know if u have any error running this in raspian

david-bour commented 5 years ago

Did u have any issues running main.py in RPI? I'm trying to running on Linux but a have a bunch of error, I would like to know if u have any error running this in raspian

What kind of errors are you getting? I did have to modify the main.py a bit to function correctly and can share my fixes. It's not entirely perfect but it works.

richyxi commented 5 years ago

when i run it, this show up

Could not find settings.ini No user colours found No user gradients found ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No existe el archivo o el directorio) attempt to connect to server failed Traceback (most recent call last): File "main.py", line 2046, in <module> microphone = Microphone(microphone_update) File "main.py", line 847, in __init__ self.setDevice(self.default_device_id) File "main.py", line 858, in setDevice self.device_id = self.devices[device_id]["index"] IndexError: list index out of range it would be a lot of help if you share your fixes man

david-bour commented 5 years ago

when i run it, this show up

Could not find settings.ini No user colours found No user gradients found ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No existe el archivo o el directorio) attempt to connect to server failed Traceback (most recent call last): File "main.py", line 2046, in <module> microphone = Microphone(microphone_update) File "main.py", line 847, in __init__ self.setDevice(self.default_device_id) File "main.py", line 858, in setDevice self.device_id = self.devices[device_id]["index"] IndexError: list index out of range it would be a lot of help if you share your fixes man

Try this and let me know how it works https://github.com/not-matt/Systematic-LEDs/pull/71

richyxi commented 5 years ago

Sure, thanks man, I just came for work I'll try it in a sec

On Sun, Feb 3, 2019, 2:30 PM David Bour <notifications@github.com wrote:

when i run it, this show up

Could not find settings.ini No user colours found No user gradients found ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No existe el archivo o el directorio) attempt to connect to server failed Traceback (most recent call last): File "main.py", line 2046, in microphone = Microphone(microphone_update) File "main.py", line 847, in init self.setDevice(self.default_device_id) File "main.py", line 858, in setDevice self.device_id = self.devices[device_id]["index"] IndexError: list index out of range it would be a lot of help if you share your fixes man

Try this and let me know how it works

71 https://github.com/not-matt/Systematic-LEDs/pull/71

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/not-matt/Systematic-LEDs/issues/70#issuecomment-460085495, or mute the thread https://github.com/notifications/unsubscribe-auth/As6sG68sxiInqyCF363Sur9ftkZRbDIfks5vJ0bLgaJpZM4afdX- .

richyxi commented 5 years ago

hi, it works good, thanks man, but it seems like its a little unestable when im trying to change the mic set up, same with the color control, and first i was playing with the effects options and it crashed, all of this things happend to your raspberry? also, im curious of how you can connect your phone to the RPI and play music? in fact, im working on this project and trying to do the same as you. cheers

pd. if someone is facing the same issue i modify main.py with those lines of code #71 and #53

david-bour commented 5 years ago

hi, it works good, thanks man, but it seems like its a little unestable when im trying to change the mic set up, same with the color control, and first i was playing with the effects options and it crashed, all of this things happend to your raspberry? also, im curious of how you can connect your phone to the RPI and play music? in fact, im working on this project and trying to do the same as you. cheers

pd. if someone is facing the same issue i modify main.py with those lines of code #71 and #53

Glad it works. There's some still GUI functions that crash that I haven't gotten around to fixing. Is this the issues you're referring to? Is it something along the lines of a KeyError?

As for the Raspberry Pi, I used bluetooth to connect my phone to my Pi, then ran the systematic-led script. Here's a tutorial of how you can activate bluetooth (https://didier.io/post/raspberrypi-stream-sound-over-bluetooth) Note, it will be very laggy and not sure if this approach is worth it.

richyxi commented 5 years ago

Yeah that was with the effects option, but sometimes happen and sometimes it goes well, a little wierd, do you think it only happens with Linux based systems??

What if a aux cable is used trough a USB audio device?

On Sun, Feb 3, 2019, 11:47 PM David Bour <notifications@github.com wrote:

hi, it works good, thanks man, but it seems like its a little unestable when im trying to change the mic set up, same with the color control, and first i was playing with the effects options and it crashed, all of this things happend to your raspberry? also, im curious of how you can connect your phone to the RPI and play music? in fact, im working on this project and trying to do the same as you. cheers

pd. if someone is facing the same issue i modify main.py with those lines of code #71 https://github.com/not-matt/Systematic-LEDs/pull/71 and #53 https://github.com/not-matt/Systematic-LEDs/issues/53

Glad it works. There's some still GUI functions that crash that I haven't gotten around to fixing. Is this the issues you're referring to? Is it something along the lines of a KeyError?

As for the Raspberry Pi, I used bluetooth to connect my phone to my Pi, then ran the systematic-led script. Here's a tutorial of how you can activate bluetooth ( https://didier.io/post/raspberrypi-stream-sound-over-bluetooth) Note, it will be very laggy and not sure if this approach is worth it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/not-matt/Systematic-LEDs/issues/70#issuecomment-460137823, or mute the thread https://github.com/notifications/unsubscribe-auth/As6sGyrHvciG4gVZLcjZfP9ZzruosDkoks5vJ8mAgaJpZM4afdX- .

david-bour commented 5 years ago

The aux might help with the lag a bit as its one less layer, but I think the main issue is just the Pi isn't powerful/fast enough to output the data to many ESP8266s at once.

richyxi commented 5 years ago

Maybe with some pi alternatives like these, may have different results https://www.zdnet.com/pictures/top-12-raspberry-pi-alternatives-february-2019/3/