Raspberry Pi

By Mousie, 27 March, 2017

Raspberry Pi Zero W

  • One of the things that attracted us to the ESP8266 was its low cost and wireless capabilities. With the introduction of the Zero W, we get that in a much more user friendly (friendlier than embedded C/C++ at least) environment. In addition, there's a wealth of mature libraries for the Raspberry Pi ecosystem that we can take advantage of that are built to standards. A lot of the Javascript code I've been working on was dealing with page generation because I didn't want to do that in C/C++. On the Raspberry Pi we can do it in almost any language we choose serverside. There was a big issue with bandwidth and latency from the ESP even with one user; I've seen pages where Pi's can handle a hundred clients simultaneously without any issues. If no one has any objections I'd like to use them moving forward. 
Forums

khyizang

7 years 11 months ago

I'd been looking into the Raspberry pi as a potential standalone MWM player with multi-media capabilities.  I figured, if the Christmas display folks can run thousands of pixels and audio/video, all at the same time, then the RPi ought to be able to run the media and flash a couple IR LEDs at the same time.

The Falcon Player environment is what the Christmas crowd uses.  In essence, they hacked their own version of the omxplayer and added E1.31 capabilities.  They also grabbed the wiringPi library to enable the GPIO pins to serve as input/output triggers.  Nice.  Looked like a cinch to port the Arduino IR stuff and get this going quickly.  But.... no.  The multi-tasking capabilities of the Pi interfere with the timing of the microdelay() function and make those delays 'approximate'.  Users haven't had any luck getting a 38kHz signal generated using that library.  Apparently, it requires getting a hacked lirc spin off that will use the GPIO pins instead of the usual serial output that lirc is designed to use. 

Instructions for installation are given elsewhere.

What I haven't found is a means to send raw codes using the lirc stuff in linux like is available on the Arduino platform.   So maybe irsend needs hacking, too?   Have you had any luck getting a valid IR signal out using Raspberry?

Another question.  The zeros lack audio out, apart from via the hdmi port and/or adding in a USB sound 'card'.  Does that bother you guys?  I don't think it adds a whole lot of expense to the baseline but it does complicate things a bit. 

The omxplayer is open source.  I could see how it would be possible to insert some code to throw the subtitles somewhere else.  But, at this point, I'm not sure if I'd want to hack the omxplayer on Raspberry or the VLC player on a PC.  That is, if I need to outsource the IR transmissions elsewhere. 

Still mulling all this over.  Any comments, progress, confusion, what?

Mousie

7 years 11 months ago

When I was thinking of the Pi Zero W, I thought about a simple transmitter with a web interface. However, you bring up really good points that it would be better to make it able to interact with other programs and devices. I'm just really used to embedded where you're just talking with yourself most of the time and don't need to share any resources.

I'll take a look at Falcon Player to see what it's all about and the same with omx. While I've been on spring break, work went crazy as well as home life and I'm a bit tired. It's only 7 as I'm writing this and already I'm drooping because I'm tired and sleepy. 

I did some light research into how the GPIO pins work on the Pi and only one pin has hardware PWM. The rest of the GPIO pins can do software PWM up to 10 khz, not quite fast enough for what we need. I'll see what I can do with it.

As far as sound, didn't think about that one either. BUT. We could output sound, over the web, to another device that does output audio nicely. Or there's a pHat for it.

I've barely looked into using the Pi but "I want to believe" that it will be nicer. I'm wrapping up for the night here at my wonderful local Starbucks so I'll get back to it tomorrow night or Saturday.

khyizang

7 years 11 months ago

When I went down to Cal, I knew that wifi access would be slim to none.  So I took along my Pi that's been programmed with Falcon Player and made sure I had copies of the other multimedia players that often get used, like Vixen, LOR, xLights, VLC, etc.   Still looking for a cheap setup that can do what VenueMagic is able to do - minus the bank-breaking cost.

I started with the Pi.  The idea was to port the MWM IR script to the Pi using the wiringPi library and push the codes out the GPIO from the same device that's running the media.  That's when I ran into the problem generating 38kHz carrier.  Looked into the Lirc_rpi hack but couldn't figure out how to send the MWM codes.  That left using the GPIO pins to trigger a separate micro that would actually fling out the MWM codes.  And that brought me right back to the problem of syncing output from different processors.  The exact headache we're trying to cure.  Pushing that aside, I switched to looking at Vixen.