As homework, move all but log.txt out of /var/www/, so it isn't visible. You could also password protect log.txtMy ATMEGA328P-PU consumption keeps at 90uA most of the time, so a battery should last a long time. The PIR sensor I picked drains by itself...