Newbie listener question using PiMapper

Forgive me - just getting into this, looks great. I am trying to extend the example app and send instructions from another process. The ofxPiMapper example has keyPress actions - i want to be able to invoke these from other methods. As a simple example, can someone advise how i might catch a SIGINT or SIGUSR and invoke the info function (as in, when the user clicks the ‘i’, the info/help panel appears).

ideally i want to have an apache server running on this host and somehow IPC (socket/pipe/whatever) but just trying to understand the framework first.

Any guidance would be helpful!


Is sending OSC an option for you? That’s how I’ve always set up communication between multiple apps. Check the OSCReceiver example for information.

Actually seems like libwebsockets might have just what i need… any tips on what steps i need to take to add ofxLibwebsockets to my build (RPi) using projectGenerator? once i create the project with projectGenerator, do i then need to clone into that dir?


Once you download the addon and put it in the addons directory, project generator should see it and allow you to build a project using the addon and setup all the dependencies. You’ll only need to add

#include "ofxLibwebsockets.h" //double check what it's called

in your ofApp.h file.

You haven’t mentioned if you’re running this on the pi or not, the pi doesn’t use the projectGenerator, I usually build the project on my Mac and then ftp it over to the myApps directory in the pi once I’ve made a project. Make sure the addon is at the right place in both the devices.

Ah - i am running this on a RPi. I was able to build projectGenerator on the pi but didnt know how to get the addons built. Is it a lost cause to try to build on the Pi? or is there a way to download the binaries for addons?

you can just git clone the addon to your addon directory.

If you got the PG running then it’s a simple matter of just adding it in when creating (or updating) a project. The makefiles should all be updated automatically to build the addon while compiling the project - you don’t need to build the addon separately.

Thanks - this was my missing link - i thought i needed to build the addons. Oddly my makes (on the RPi) sometimes are very quick and other times seem to rebuild all kinds of things that havent change. has anyone seen this behavior?