View unanswered posts | View active topics It is currently Sat Oct 25, 2014 12:15 am






Reply to topic  [ 9 posts ] 
help with Checkout Scanner project 
Author Message
Rookie

Joined: Sat Mar 24, 2012 10:15 am
Posts: 6
Post 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);
    }

  }}


Sat Mar 24, 2012 10:24 am
Profile
Rookie

Joined: Sat Mar 24, 2012 10:15 am
Posts: 6
Post Re: help with Checkout Scanner project
any ideas??


Sat Mar 24, 2012 10:26 am
Profile
Rookie

Joined: Fri Jan 27, 2012 6:57 pm
Posts: 40
Post Re: help with Checkout Scanner project
What kind of values is it giving you? How are they different from what you expected?


Sat Mar 24, 2012 11:07 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3227
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Mar 24, 2012 11:16 am
Profile WWW
Rookie

Joined: Sat Mar 24, 2012 10:15 am
Posts: 6
Post 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


Sat Mar 24, 2012 12:17 pm
Profile
Rookie

Joined: Sat Mar 24, 2012 10:15 am
Posts: 6
Post Re: help with Checkout Scanner project
if i pass the object with differnt speed the reading would be differnet


Sat Mar 24, 2012 12:19 pm
Profile
Rookie

Joined: Sat Mar 24, 2012 10:15 am
Posts: 6
Post 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


Sat Mar 24, 2012 12:21 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3227
Location: Rotterdam, The Netherlands
Post Re: help with Checkout Scanner project
Then why don't you mimic the same behaviour?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Mar 25, 2012 4:02 am
Profile WWW
Rookie

Joined: Sat Mar 24, 2012 10:15 am
Posts: 6
Post Re: help with Checkout Scanner project
i did but it doesnot give accurate reading


Sun Mar 25, 2012 4:24 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.