This is the camera I used: https://www.amazon.com/Arducam-Megapixels-Sensor-OV5647-Raspberry/dp/B012V1HEP4
And I think the version of Motion discussed in this Instructable is what I used, but it's been a few years and the whole thing might be different by now.