Moved logic to logic.c.
Merge branch 'master' into logic
Merge pull request #15 from leomuona/master

motor code should now control pins
Added remote control for enabling/disabling logic. Moved all logic from main to logic.
Merge branch 'logic'

Conflicts:
	src/main.c
BMP file reader/writer.
For now run the logic loop only once.
Changed camera functions to use BMP for storing.
Swap the BMP rows read from stdout.
Initial implementation of motion detection.

The most simple one with frame difference tests, contains difference
threshold and noise filter options.

Quite unsure if rasp can perform with this algorithm.
Merge pull request #16 from jesseniemisto/master

Fixes and bmp export for taken pics.
Logic loop for taking pictures.
Added motion detection (debug) logic loop.
Changed diff threshold from 90 to 45.
Changed raspistill timeout from default 5000ms to 0ms.
audio should not sleep in logic loop.
Merge pull request #17 from jesseniemisto/master

audio should not sleep in logic loop.
Added volume controls to audio. (static var)
Merge pull request #18 from jesseniemisto/master

Added volume controls to audio. (static var)
fixes to sleep time in motor turning