Author Topic: Needed Help for this!  (Read 1623 times)

0 Members and 1 Guest are viewing this topic.

Offline arigidTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Needed Help for this!
« on: September 30, 2011, 02:21:01 PM »
Hello all, I Was just wondering on how to count the number of intersections(If any) while following a white line.

Well it was for a local competition, Please help, if you could suggest an Algorithm for the Same, Thanks!

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer ยท Roboticist
    • Index of Oddities
Re: Needed Help for this!
« Reply #1 on: September 30, 2011, 03:25:28 PM »
Increment a variable by one each time?

More details are needed.....
I

Offline arigidTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Needed Help for this!
« Reply #2 on: September 30, 2011, 11:07:29 PM »
Well theres a Grid of white line in the arena and the bot is supposed to follow a fixed path, so it thought of doing it by counting the intersections, I first thought of using a counter function but that was having some problems , Please help if you could, Thanks!

Offline Fr0stAngel

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 3
  • [O_O] what??
Re: Needed Help for this!
« Reply #3 on: October 01, 2011, 09:44:47 AM »
assuming you are working with an array of sensors , arranged in a straight line configuration like following
                                         
                                                              # # # # # # # #


The picture shows some situations that might arise when you cross the junctions.  now you can program your micro-controller to increment junction count variable when any of these situations arises. ( remember that these situations may or may not occur in your case, you must check it)
in this example, increment junction count when you get
- all high ( or low depending on your hardware implementation) from the sensors.
- high (or low for inverse configuration) on sensors 1,2,5,6
- high (or low for inverse configuration) on sensors 2,3,7,8

 here  is a good link about line following , go through it if you still have some doubts.http://www.ikalogic.com/tut_line_sens_algo.php
'crazy' is the new hype! =)

 


Get Your Ad Here

data_list