Building the 'Bot' is relatively simple and 4Tronix have provided some easy to follow instructions on-line (http://4tronix.co.uk/crumble/CrumbleBot.pdf) that are almost foolproof (I manage to build it!).
So I wanted to experiment with making a edge following robot - where the robot goes around a line by following the edge of the line. The idea is while make small movements,
- Check that one of the sensors is on the line (in my case the right sensor);
- If that sensor detects the line, then pull the robot to the left slightly and then forward a small step;
- If the sensor does not detect the line, the pull the robot to the right slightly.
Accidentally, I end up playing with two ways to detect the line. Started with connecting, using crocodile clips, the two sensors to the Crumble and treating them as analogue signals and if there was a big difference between the one I want to stay on the line and the one off the line then the line's edge is detected. The assumption is the sensor on the black line reflects less light, so a lower value produced and that is what is detected. It work see the video below that used this approach - but the assumption was wrong.
4Tronix contacted me saying the line sensors are digital (thank you for that), so used them as a digital inputs and it did simplify the code a lot and still worked.
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.