View unanswered posts | View active topics It is currently Mon Oct 19, 2020 11:05 pm

Reply to topic  [ 2 posts ] 
Values with line follower? 
Author Message

Joined: Wed Nov 14, 2012 12:07 pm
Posts: 6
Post Values with line follower?
i don't know why but i don't understand the changing typ defs issue? my kids are using a line follower to get a value of a marble (steel,wood,plastic) and want to use the value code to determine further actions. help!

File comment: this is his program.
davidanthonymarblesorterversion1.c [1.05 KiB]
Downloaded 471 times
Wed Jan 22, 2014 12:16 pm
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: Values with line follower?
A quick example of the problematic code is below:

if(SensorValue(linefollower >180 &&  linefollower <200)

The issue with this is that the SensorValue() command should contain the name of the sensor inside of the SensorValue() command's parentheses. You will also need to use the SensorValue command each time you would like to read a sensor (even if it is the same sensor):

if(SensorValue(linefollower) >180 &&  SensorValue(linefollower) <200)

Try updating the code as such and see if the syntax errors clear themselves out.

Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.

Wed Jan 22, 2014 12:52 pm
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.