C++ code for BeagleBone