An attempt of a direct translation of the python BerryPI repository to the C/C++