Author Topic: some algorithms  (Read 3396 times)

0 Members and 1 Guest are viewing this topic.

Offline andreahmedTopic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
some algorithms
« 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 ?

Offline andreahmedTopic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
Re: some algorithms
« Reply #1 on: July 10, 2007, 07:43:42 AM »
any idea ?  ???

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: some algorithms
« Reply #2 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

 


data_list