clone from nxt_apps for RPi