View unanswered posts | View active topics It is currently Mon Dec 22, 2014 5:15 am






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

Joined: Wed Nov 14, 2012 12:07 pm
Posts: 4
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!


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

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

Code:
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):

Code:
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 Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Wed Jan 22, 2014 12:52 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: rrucu 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.