Barcode Sensor for Scribbler 2
Dashing
Posts: 3
I just started using the Scribbler 2 robot and I'm programming using the Scribbler Program Maker (S2 v1.3). While most of the conditions are self-explanatory, I don't really understand how to use the barcode sensor. There are three icons for the barcode sensor, can anyone explain the difference between them and how to use them? Also, would the barcode sensor conflict with the line following sensor?
1.
2.
3.
1.
2.
3.
Comments
Welcome to the Parallax forum! Per your labels above,
Number 1 returns true if the S2 passes over the #1 barcode in the forward direction.
Number 2 returns true if the S2 passes over the #1 barcode in the reverse direction.
Number 3 returns true if the S2 passes over the #1 barcode in either direction.
-Phil
I was trying to program the robot to follow a black line on a white surface and stop at then end where the robot would see barcode #1. While the line following code works fine when I didn't add in the first conditon for the barcode, the robot doesn't seem to be following the black line after I add in the first condition for the barcode sensor. I pasted my program on the two pictures below. Can anyone explain to me did I do something wrong?
What you could try is to add the barcode sensor to the end of the line sensor test, such that if both sensors see "light", pause for a short instant, then test again. If both sensors then see dark, process the barcode. In your layout, you will want a short light-colored gap between the line and the first bar of the barcode.
-Phil
I was hoping that if the robot is following the straight black line without the need to adjust near the end, no flag would be raised so it'll bypass all the conditions and goes to the end, which would exit the loop. However, the robot simply spins in circle in the end until it finds the black line again.
-Phil