ROBOTC.net forums
http://www.robotc.net/forums/

help with Checkout Scanner project
http://www.robotc.net/forums/viewtopic.php?f=15&t=4394
Page 1 of 1

Author:  ameer [ Sat Mar 24, 2012 10:24 am ]
Post subject:  help with Checkout Scanner project

hi every body im trying to make the nxt Checkout Scanner project wich is found here
http://www.nxtprograms.com/NXT2/checkout_scanner/steps.html
by robotc im facing a problem that the color sensor does not give acurate reading according to my code here

Code:

#pragma config(Sensor, S1,     S3,             sensorCOLORFULL)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main(){
  int c=0;
  int a=0;
  int m=0;
  while(true){
    int a=SensorValue[S1];
    wait1Msec(1);
    c=SensorValue[S1];
    if(a==6 && c==1){
    m++;
 PlaySound(soundBlip);
    }

  }}

Author:  ameer [ Sat Mar 24, 2012 10:26 am ]
Post subject:  Re: help with Checkout Scanner project

any ideas??

Author:  sumasmreq [ Sat Mar 24, 2012 11:07 am ]
Post subject:  Re: help with Checkout Scanner project

What kind of values is it giving you? How are they different from what you expected?

Author:  mightor [ Sat Mar 24, 2012 11:16 am ]
Post subject:  Re: help with Checkout Scanner project

I think one of the issues is that you are only waiting 1 millisecond between checking the sensor for black and white. What does the original NXT-G program have as a waiting time?

- Xander

Author:  ameer [ Sat Mar 24, 2012 12:17 pm ]
Post subject:  Re: help with Checkout Scanner project

im using the color sensor in mode (sensorCOLORFUL) so it would return 6 if it see white and 1when black or gray

Author:  ameer [ Sat Mar 24, 2012 12:19 pm ]
Post subject:  Re: help with Checkout Scanner project

if i pass the object with differnt speed the reading would be differnet

Author:  ameer [ Sat Mar 24, 2012 12:21 pm ]
Post subject:  Re: help with Checkout Scanner project

in the orignal project it doesnt depend on the speed all you have to do is to pass the object in less one second

Author:  mightor [ Sun Mar 25, 2012 4:02 am ]
Post subject:  Re: help with Checkout Scanner project

Then why don't you mimic the same behaviour?

- Xander

Author:  ameer [ Sun Mar 25, 2012 4:24 am ]
Post subject:  Re: help with Checkout Scanner project

i did but it doesnot give accurate reading

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/