First commit

An attempted literal translation between python and C code on some of
the BerryPI code.