camera - finished C code, but untested