Hi Everyone,
Thanks to the help here, my Photo Booth project was a success and I have now begun a 'move - stop - shoot' time lapse slider project and I'm hoping someone here will have some ideas for where I could find some basic example code for the following situation.
I've bought a 'Metal Gearmotor 37Dx57L mm with 64 CPR Encoder' from Pololu and wired it up through a Motor Driver Shield based on the L298 H-bridge to my Arduino.
motor;
Driver Shield;
The idea being that the position of the DC motor can be recorded and a specific number of rotations can be programmed per photograph, I realise this is normally done with a stepper motor, but I wanted the 'security' of a gearbox to prevent slippage of the slider drive system.
So far I have be able to program the motor to rotate at varying speeds for varying amounts of time in different directions using the example sketch found on the driver shield page. This sketch though is not set up for the encoder and is insufficient for my needs, as I need to control shaft rotations, not time receiving power. Otherwise, increased load or drops in voltage would change the amount of movement of the camera at each photograph.
So, what I am looking for is a sketch that could drive the Motor and count the rotations so I can program it to simply rotate x number of time, stop for a period and then repeat (I will program in the camera triggering later. I've had a look around on these forums, you tube, instructables etc and so far not come up with any starting points, if anyone has any suggestions it will be greatly appreciated!
Thanks,
James
