Barcode Challenge

Hi Mr E,

We’ve been working on the first part of the barcode reading challenge. It does beep when it goes over the line, but if we have the colour sensor too low, it detects the floor and beeps, because we have a dark blue coloured floor. It detects the thin lines now. We have tried to trouble shoot as much as we can and we think it is finished. We have realised that with the thick lines it beeps at the start and the end of the line as well. How do you make the robot sense only black and make it beep only when it goes over black? We thought we had it set that it would only sense black, but why does it sense the dark blue on the floor? Does it have anything to do with the lighting? Here is screenshot of our program:

 

 

Here is a video of it:

From Katiya, Miki and Lydia.

One thought on “Barcode Challenge

  1. Hi Katiya, Miki, and Lydia,
    Good on you for taking on this challenge. You have written a great post with a really good video. As a bonus, you have worked out how to make your own solution to the problem. With a little help, I suspect your solution will be more elegant than my first solution.
    I think the reason why the robot is double beeping is that you have the wait block set to change of colour. Going over a black bar has two changes of colour: white->black and black->white. I think you could differentiate between the thin lines and the thick lines by putting a wait block set to [0.5 or 0.9?] seconds after the colour change wait block. This will make it beep only once after the thin line (because the robot will run off the thin black line before the second timer runs out). You can remove the middle yellow sensor block… it is not needed.
    If you get that working, I suggest you try and make the robot count: two for a thick line, one for a thin line. Here is URL that you can use to see how to make a robot count:
    (see section 13: variables)
    https://sites.google.com/site/gask3t/lego-ev3/the-missing-commentaries/ev3-beyond-basics-exercises-12-18

    Let me know how you go,
    Bob (Mr. E)

Leave a Reply

Your email address will not be published. Required fields are marked *