Showing posts with label red fern electronics. Show all posts
Showing posts with label red fern electronics. Show all posts

Sunday 19 July 2015

Edge following CrumbleBot

Recently I have been playing with the CrumbleBot (http://4tronix.co.uk/store/index.php?rt=product/product&product_id=493) based around the Crumble Controller (http://redfernelectronics.co.uk/crumble/) providing a intuitive graphical interface (similar to Scratch) to control two motors and four inputs/outputs. The CrumbleBot comes with line-detecting sensors and Light-Dependent Resistors for light detection, with a few other features that I have yet to play with. So is nice little framework for simple robotics. Make sure you order the Crumble Controller at the same time as CrumbleBot.

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.

ChatGPT, Data Scientist - fitting it a bit

This is a second post about using ChatGPT to do some data analysis. In the first looked at using it to some basic statistics  https://robots...