Fadecandy Raspberry Pi standalone setup

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
GhostStrype
 
Posts: 18
Joined: Fri Aug 08, 2014 6:20 pm

Fadecandy Raspberry Pi standalone setup

Post by GhostStrype »

So I have a lot of functionality coming into play with my Fadecandy project (which really brings out some great nuances in color and presentation normally lacking hard in LED setups). Once it is all done being constructed all pretty and such I will post/show-and-tell it, but I am wondering what it takes to get the system running standalone (no auxiliary computer just the electronics, strips, pi, and fadecandy).
I am decent at figuring out the programming side although I have not dabbled this hard into the programming side since some of my engineering courses. I also apologize if something of the nature has already been posted. I am not sure on some of the jargon/technical phrases involved in the setup of such a system so it is a little hard to find similar topics haha.

If I am to use Open Pixel Control Protocol (OPC) to control the fadecandy controller output to the LED as a standalone system, what are the general steps entailed in such a design?
As I read OpenOPC can use python which should run better on the Pi than Processing, and OpenOPC communicates over TCP connections. Python will also work well with pre-built Wiimote and TouchOSC libraries.

So am I to try to setup the Pi as a Python-based TCP server and send OPC messages to the Fadecandy board as a client? Does this still need a router present for TouchOSC wifi signals via iPhone? or can that all be handled by the Pi without that? And then setting it up so that the pi begins running it all on system startup so that I do not need to login unless I want to add to/modify led code. How might that be handled?

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Fadecandy Raspberry Pi standalone setup

Post by pburgess »

You'd send OPC messages to the Fadecandy server (not board). Code-wise, it's the same as if it were across a network, you just change the host address in your code to 'localhost' or '127.0.0.1'.

fadecandy/examples/python has some demos to get you started (these all do the localhost thing).

For the TouchOSC stuff, you can probably set the Pi up as a standalone WiFi hotspot and link the phone to that. Some info here: http://elinux.org/RPI-Wireless-Hotspot

To auto-start your code, it can added to /etc/rc.local (same way fcserver is auto-started). This project shows an example of that:
https://learn.adafruit.com/1500-neopixe ... rver-setup

User avatar
benjrm
 
Posts: 4
Joined: Tue Nov 18, 2014 10:35 pm

Re: Fadecandy Raspberry Pi standalone setup

Post by benjrm »

Hi Pburgess/all,
I am trying to run an LED installation on a headless Raspberry Pi B+. I have everything running perfectly, except I cannot get the exported Processing app to run at startup when the raspi is headless. If I log in via SSH then it starts automatically, but not when it is a black box.

I tried adding it to local.rc but that did not work, so it is currently set up as a line in /etc/xdg/lxsession/LXDE-pi/autostart to make sure it runs after the GUI loads.

I believe this is an issue with user-dependant settings or the like.

Any help would be greatly appreciated.

I'm running the latest rasbian and Processing 2.2.1

Thanks

Jack

User avatar
GhostStrype
 
Posts: 18
Joined: Fri Aug 08, 2014 6:20 pm

Re: Fadecandy Raspberry Pi standalone setup

Post by GhostStrype »

I am not quite sure on that as I am running a python script on startup for the fadecandy with the neopixels, but I think it is etc/rc.local if you have that wrong?

Also just curious about how well processing runs some of the examples from the fadecandy (like scrolling through the images, and perlin noise based ones like the cloud) on the Pi B+!

User avatar
benjrm
 
Posts: 4
Joined: Tue Nov 18, 2014 10:35 pm

Re: Fadecandy Raspberry Pi standalone setup

Post by benjrm »

Yeah I used etc/rc.local but no luck.

Stay away from Processing on any Gen 1 Raspberry Pi. On my B+, with the "clouds" example running, I get about 5FPS at 100% CPU utilisation. The fadecandy interpolates this so the transitions are smooth, but you can still see it ramping between key frames.

overclocking helps a little, but then you're overclocking it...

There are also issues with manipulating pixels and a few other things.

I would wait for the Raspberry Pi 2 if you really need to use Processing.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”