Society of Robots - Robot Forum

Software => Software => Topic started by: andreahmed on July 09, 2007, 09:52:46 PM

Title: some algorithms
Post by: andreahmed on July 09, 2007, 09:52:46 PM
hi , first i wanna know how to use the encoders for positional control , i read the tutorial here , and the pid one , i just want use it to make the turns like 90Degrees , 180 ..etc
is this pseudo code correct ?

while ( desired_position !=actual_position)
{

error = desired_position - actual_position
error = error * KP  // proportional control
pwm ( error) // pwm the motor to the desired position
}

also i were pariticipated in a contest Robocon
http://www.vtv.org.vn/robocon/2007en/en/index.asp?menuid=838&parent_menuid=838&fuseaction=3&articleid=2214

some guys said they were using 8 Sensors for line following , i wish ya write a tutorial about something like that , like how we can follow a line in a good speed also how to count the crossing lines and how to do the turns like 90 and 180 in something like the game field showing there , can u write some algorithms plz ?
Title: Re: some algorithms
Post by: andreahmed on July 10, 2007, 07:43:42 AM
any idea ?  ???
Title: Re: some algorithms
Post by: Admin on July 11, 2007, 11:19:32 AM
Quote
some guys said they were using 8 Sensors for line following , i wish ya write a tutorial about something like that , like how we can follow a line in a good speed also how to count the crossing lines and how to do the turns like 90 and 180 in something like the game field showing there , can u write some algorithms plz ?

You mean like this? :P
http://www.societyofrobots.com/competitions_mobot.shtml