MRAA and Python on Ubilinux
Yo. I was recently talking to a colleague who was doing some Python work, and wasn’t entirely sure how to go about controlling a Galileo’s GPIO from a Python script. I knew that MRAA actually had Python bindings, but I’d never really been interested in them. Hence, I decided to dig a little deeper to see if I couldn’t get it to work. Turns out its a pretty straightforward process. Basically, you’ll need to have something called SWIG installed. Sadly, I’m not sure which particular version of SWIG it is I have, but I think its regular old Swig 2.0 (which is installed with ‘apt-get install swig’). You’ll also need Python 2.7.x and the Python development libraries, which is installed with ‘apt-get install python python-dev’. Once that’s done, the process is mostly as described in previous posts, with the cardinal difference that the cmake invocation is now as follows: cmake –DCMAKE_C_COMPILER=clang –DCMAKE_CXX_COMPILER=clang++ –DCMAKE_C_FLAGS=-march=i586 –mno-sse –mno-mmx –DCMAKE_CXX_FL...