View unanswered posts | View active topics It is currently Fri Nov 28, 2014 11:57 am






Reply to topic  [ 2 posts ] 
Using readed values from sensors 
Author Message
Rookie

Joined: Wed Feb 06, 2013 2:01 pm
Posts: 1
Post Using readed values from sensors
Hello,
I am doing really easy thing now, the line. Everything was good, everything functioned but only at my home. At diferent conditions (material of board where is another line etc.) it was not working. My friend told me that I need calibration or something like that. I want to read values from light sensors and then use it in source of line. The problem is that i did find nothing about that in lots of tutorials, helps. I am really new in this world and I am not native speaker.
I think it has to look like this:
Code:
int x;

sub calibration ()
{
while (time1[timer]=5)
{
motor[leftServo]  = 20;
motor[rightServo] = 20;
here Lightsensors reading values
}
x=readed value from sensors
}

than I want to use it in source for line
Is it possible to do it like that? I was doing somtehing in brix comand center but its something totally diferent for me.
Thanks for help


Wed Feb 06, 2013 2:22 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 610
Post Re: Using readed values from sensors
It looks like you have the right idea, it may be the ROBOTC syntax that is holding you up. No worries, though; we have a Video Curriculum Trainer available for scenarios just like this one. I would suggest going through the videos, which will introduce you to ROBOTC, its syntax, controlling motors, and how to use sensors (among other things). There is even a segment dedicated to line tracking that you may want to look at (found in the Sensing -> Line Tracking segment).

I would work through the videos and modify your code as you go; if you still have questions afterwards, we are always happy to help 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


Fri Feb 08, 2013 4:28 pm
Profile
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:  
cron



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