Bar code reader is written in the NXT-G environment to give to everyone the possibility to use it in its project.
Following these simple steps you can realize your own barcode driven robot!
- Equip your explorer robot with the light sensor pointed to the floor to a distance of 1,0 -1,5 cm from it (see close up in gallery).
- Download the BarCodeReader block and save it under your my blocks directory (usually C:\Documents and Settings\
\Documents\LEGO Creations\MINDSTORMS Projects\Profiles\Default\Blocks\My Blocks) - Download the Excel file containing the bar code and print them or make your own barcodes following these simple rules.
- Make your project using the BarCodeReader block with input in NumOfBar plug of number of black strips of your code -1. If you use the BarCode.xls file downloaded from this site, the right value is 5. Read the page Technical Informations for furter informations.
- Optionally, you can download the GetStarted sample project (remember to copy the BarCodeReader block in the right position -see step 2)
In this case remember that the right sheet to use is the one labeled 23-30. - A black bar is recognized if the ligth sensor read a value < 45. A Value >=45 is interpreted as a white bar. Before launch the program place the light sensor of the robot in a black and in a white area. If the black value or the white area are near to the trigger value of 45 take the right action:
- move the light sensor a litlle up or down;
- make a more darker print of the barcode;
-change the trigger value by editing the barcode.rbt block. (Advanced user only).
Support this project:Don't forget to e-mail your impression for this project to claudio.ditursi@multimatica.it
沒有留言:
張貼留言